Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Müller <fmueller@owncloud.com>2021-04-09 16:04:43 +0300
committerFabian Müller <80399010+fmoc@users.noreply.github.com>2021-04-15 19:24:13 +0300
commitab110bce9082f620b71c2c0ae157f6fa4513885c (patch)
treeca72a303d95bc45bba00c979f138e0c043eec46d /src/gui/folderman.h
parent3754b12fcfc6f28e3e72ded0902f9bf18a9b59af (diff)
Display last sync date in context menu
This way, the user can quickly see what "up to date" refers to. In case the last sync was done on the same day, the date is hidden and only the time is shown.
Diffstat (limited to 'src/gui/folderman.h')
-rw-r--r--src/gui/folderman.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/gui/folderman.h b/src/gui/folderman.h
index 375ffe882..b45f4ad46 100644
--- a/src/gui/folderman.h
+++ b/src/gui/folderman.h
@@ -35,6 +35,18 @@ class SocketApi;
class LockWatcher;
/**
+ * @brief Return object for Folder::trayOverallStatus.
+ * @ingroup gui
+ */
+class TrayOverallStatusResult
+{
+public:
+ SyncResult::Status overallStatus;
+ bool hasUnresolvedConflicts;
+ QDateTime lastSyncDone;
+};
+
+/**
* @brief The FolderMan class
* @ingroup gui
*
@@ -134,9 +146,11 @@ public:
/// Produce text for use in the tray tooltip
static QString trayTooltipStatusString(SyncResult::Status syncStatus, bool hasUnresolvedConflicts, bool paused);
- /// Compute status summarizing multiple folders
- static void trayOverallStatus(const QList<Folder *> &folders,
- SyncResult::Status *status, bool *unresolvedConflicts);
+ /**
+ * Compute status summarizing multiple folders
+ * @return tuple containing folders, status, unresolvedConflicts and lastSyncDone
+ */
+ static TrayOverallStatusResult trayOverallStatus(const QList<Folder *> &folders);
// Escaping of the alias which is used in QSettings AND the file
// system, thus need to be escaped.