From 0f41d8bf46e034eef4572795383956b860bd6e70 Mon Sep 17 00:00:00 2001 From: csoler Date: Thu, 1 Jun 2023 20:30:19 +0200 Subject: [PATCH] fixed sorting of files->status in channels all files list --- .../src/gui/gxschannels/GxsChannelPostFilesModel.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/retroshare-gui/src/gui/gxschannels/GxsChannelPostFilesModel.cpp b/retroshare-gui/src/gui/gxschannels/GxsChannelPostFilesModel.cpp index 856ef32e1..54b787e65 100644 --- a/retroshare-gui/src/gui/gxschannels/GxsChannelPostFilesModel.cpp +++ b/retroshare-gui/src/gui/gxschannels/GxsChannelPostFilesModel.cpp @@ -342,10 +342,13 @@ public: case RsGxsChannelPostFilesModel::COLUMN_FILES_FILE: { FileInfo fi1,fi2; - rsFiles->FileDetails(f1.mHash,RS_FILE_HINTS_DOWNLOAD,fi1); - rsFiles->FileDetails(f2.mHash,RS_FILE_HINTS_DOWNLOAD,fi2); + bool r1 = rsFiles->FileDetails(f1.mHash,RS_FILE_HINTS_DOWNLOAD,fi1); + bool r2 = rsFiles->FileDetails(f2.mHash,RS_FILE_HINTS_DOWNLOAD,fi2); - return (ord==Qt::AscendingOrder)?(fi1.transferedfi2.transfered); + if(r1 && r2) + return (ord==Qt::AscendingOrder)?(fi1.transferedfi2.transfered); + else + return (ord==Qt::AscendingOrder)?(fi1.downloadStatusfi2.downloadStatus); } }