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>
This commit is contained in:
Matthieu Gallien 2023-06-06 18:16:43 +02:00
parent 5372276779
commit fe748fafa5

View file

@ -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)