Skip to content

Commit

Permalink
Only start displaying status starting at 1.
Browse files Browse the repository at this point in the history
e.g. "0 f 6 files" => "1 of 6 files"

Signed-off-by: Camila Ayres <[email protected]>
  • Loading branch information
camilasan committed Jul 5, 2024
1 parent 9565f71 commit 0498f2a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gui/folderstatusmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ void FolderStatusModel::slotUpdateFolderState(Folder *folder)
if (!folder) {
return;
}

for (auto i = 0; i < _folders.count(); ++i) {
if (_folders.at(i)._folder == folder) {
emit dataChanged(index(i), index(i));
Expand Down Expand Up @@ -1105,7 +1105,7 @@ void FolderStatusModel::slotSetProgress(const ProgressInfo &progress)
const auto totalSize = qMax(completedSize, progress.totalSize());

QString overallSyncString;
if (totalSize > 0) {
if (totalSize > 0 && completedSize > 0) {
const auto completedSizeString = Utility::octetsToString(completedSize);
const auto totalSizeString = Utility::octetsToString(totalSize);

Expand Down Expand Up @@ -1134,7 +1134,7 @@ void FolderStatusModel::slotSetProgress(const ProgressInfo &progress)
.arg(currentFile)
.arg(totalFileCount);
}
} else if (totalFileCount > 0) {
} else if (totalFileCount > 0 && currentFile > 0) {
// Don't attempt to estimate the time left if there is no kb to transfer.
overallSyncString = tr("file %1 of %2").arg(currentFile).arg(totalFileCount);
}
Expand Down

0 comments on commit 0498f2a

Please sign in to comment.