Bladeren bron

use a better user message for network errors

tell users this is a network error and the client wll retry
automatically

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
Matthieu Gallien 2 jaren geleden
bovenliggende
commit
f43c0b6116
1 gewijzigde bestanden met toevoegingen van 6 en 2 verwijderingen
  1. 6 2
      src/gui/tray/activitylistmodel.cpp

+ 6 - 2
src/gui/tray/activitylistmodel.cpp

@@ -559,8 +559,12 @@ void ActivityListModel::addEntriesToActivityList(const ActivityList &activityLis
 void ActivityListModel::addErrorToActivityList(const Activity &activity, const ErrorType type)
 {
     qCInfo(lcActivity) << "Error successfully added to the notification list: " << type << activity._message << activity._subject << activity._syncResultStatus << activity._syncFileItemStatus;
-    addEntriesToActivityList({activity});
-    _notificationErrorsLists.prepend(activity);
+    auto modifiedActivity = activity;
+    if (type == ErrorType::NetworkError) {
+        modifiedActivity._subject = tr("Network error occurred: client will retry syncing.");
+    }
+    addEntriesToActivityList({modifiedActivity});
+    _notificationErrorsLists.prepend(modifiedActivity);
 }
 
 void ActivityListModel::addIgnoredFileToList(const Activity &newActivity)