From 03cddabfd026af3af0006bd73bb7733c8b7b73f3 Mon Sep 17 00:00:00 2001 From: Michael Schuster Date: Sun, 19 Jan 2020 19:12:34 +0100 Subject: [PATCH] Tray menu: Only show time ago (view too noisy) Don't show date and time for now, rather as a tool tip later. Signed-off-by: Michael Schuster --- src/gui/tray/ActivityListModel.cpp | 3 ++- src/gui/tray/UserModel.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/tray/ActivityListModel.cpp b/src/gui/tray/ActivityListModel.cpp index a9b2efc64..f97af5eac 100644 --- a/src/gui/tray/ActivityListModel.cpp +++ b/src/gui/tray/ActivityListModel.cpp @@ -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: diff --git a/src/gui/tray/UserModel.cpp b/src/gui/tray/UserModel.cpp index b7dbc8fed..4c0ebdd1e 100644 --- a/src/gui/tray/UserModel.cpp +++ b/src/gui/tray/UserModel.cpp @@ -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(); -- 2.30.2