Tray menu: Only show time ago (view too noisy)
authorMichael Schuster <michael@schuster.ms>
Sun, 19 Jan 2020 18:12:34 +0000 (19:12 +0100)
committerMichael Schuster <michael@schuster.ms>
Sun, 19 Jan 2020 18:12:34 +0000 (19:12 +0100)
Don't show date and time for now, rather as a tool tip later.

Signed-off-by: Michael Schuster <michael@schuster.ms>
src/gui/tray/ActivityListModel.cpp
src/gui/tray/UserModel.cpp

index a9b2efc64381ca9b307c1295b096c66b4b3e3312..f97af5eac0e3bd3b75d67bcd1e6a684eb711f1fb 100644 (file)
@@ -188,7 +188,8 @@ QVariant ActivityListModel::data(const QModelIndex &index, int role) const
     case AccountRole:
         return a._accName;
     case PointInTimeRole:
-        return a._id == -1 ? "" : QString("%1 - %2").arg(Utility::timeAgoInWords(a._dateTime.toLocalTime()), a._dateTime.toLocalTime().toString(Qt::DefaultLocaleShortDate));
+        //return a._id == -1 ? "" : QString("%1 - %2").arg(Utility::timeAgoInWords(a._dateTime.toLocalTime()), a._dateTime.toLocalTime().toString(Qt::DefaultLocaleShortDate));
+        return a._id == -1 ? "" : Utility::timeAgoInWords(a._dateTime.toLocalTime());
     case AccountConnectedRole:
         return (ast && ast->isConnected());
     default:
index b7dbc8fed12ad011f1a1ecb9a028f5940a10244c..4c0ebdd1e1c28107d50e84ebdd201528346f66e0 100644 (file)
@@ -770,7 +770,7 @@ void UserModel::fetchCurrentActivityModel()
 
 AccountAppList UserModel::appList() const
 {
-    if (_users.count() >= 1) {
+    if (_users.count() > 0) {
         return _users[_currentUserId]->appList();
     } else {
         return AccountAppList();