From c518fd0e42bb3c2d63e237ac6d52138648e7aab9 Mon Sep 17 00:00:00 2001 From: defnax Date: Sat, 28 Jan 2023 13:48:26 +0100 Subject: [PATCH] Added to show on New Board/New Channel feed last updated time Added to show on New Board/New Channel feed last updated time --- .../src/gui/feeds/GxsChannelGroupItem.cpp | 6 +++++ .../src/gui/feeds/GxsChannelGroupItem.ui | 16 ++++++++++- .../src/gui/feeds/PostedGroupItem.cpp | 5 ++++ .../src/gui/feeds/PostedGroupItem.ui | 27 +++++++++++++++++++ 4 files changed, 53 insertions(+), 1 deletion(-) diff --git a/retroshare-gui/src/gui/feeds/GxsChannelGroupItem.cpp b/retroshare-gui/src/gui/feeds/GxsChannelGroupItem.cpp index 41c61d896..e9c38a022 100644 --- a/retroshare-gui/src/gui/feeds/GxsChannelGroupItem.cpp +++ b/retroshare-gui/src/gui/feeds/GxsChannelGroupItem.cpp @@ -27,6 +27,7 @@ #include "gui/common/FilesDefs.h" #include "gui/NewsFeed.h" #include "gui/RetroShareLink.h" +#include "util/DateTime.h" /**** * #define DEBUG_ITEM 1 @@ -166,6 +167,11 @@ void GxsChannelGroupItem::fill() break ; } + if(mGroup.mMeta.mLastPost==0) + ui->infoLastPost->setText(tr("Never")); + else + ui->infoLastPost->setText(DateTime::formatLongDateTime(mGroup.mMeta.mLastPost)); + if (mIsHome) { /* disable buttons */ diff --git a/retroshare-gui/src/gui/feeds/GxsChannelGroupItem.ui b/retroshare-gui/src/gui/feeds/GxsChannelGroupItem.ui index 6c568993d..151e6920b 100644 --- a/retroshare-gui/src/gui/feeds/GxsChannelGroupItem.ui +++ b/retroshare-gui/src/gui/feeds/GxsChannelGroupItem.ui @@ -7,7 +7,7 @@ 0 0 618 - 161 + 176 @@ -221,6 +221,20 @@ + + + + Last activity + + + + + + + TextLabel + + + diff --git a/retroshare-gui/src/gui/feeds/PostedGroupItem.cpp b/retroshare-gui/src/gui/feeds/PostedGroupItem.cpp index 4ed8a95c4..f4abafb08 100644 --- a/retroshare-gui/src/gui/feeds/PostedGroupItem.cpp +++ b/retroshare-gui/src/gui/feeds/PostedGroupItem.cpp @@ -26,6 +26,7 @@ #include "gui/RetroShareLink.h" #include "gui/gxs/GxsIdDetails.h" #include "gui/common/FilesDefs.h" +#include "util/DateTime.h" /**** * #define DEBUG_ITEM 1 @@ -160,6 +161,10 @@ void PostedGroupItem::fill() ui->logoLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/posted.png")); } + if(mGroup.mMeta.mLastPost==0) + ui->infoLastPost->setText(tr("Never")); + else + ui->infoLastPost->setText(DateTime::formatLongDateTime(mGroup.mMeta.mLastPost)); //TODO - nice icon for subscribed group // if (IS_GROUP_PUBLISHER(mGroup.mMeta.mSubscribeFlags)) { diff --git a/retroshare-gui/src/gui/feeds/PostedGroupItem.ui b/retroshare-gui/src/gui/feeds/PostedGroupItem.ui index 636cc2c54..b525facb9 100644 --- a/retroshare-gui/src/gui/feeds/PostedGroupItem.ui +++ b/retroshare-gui/src/gui/feeds/PostedGroupItem.ui @@ -213,6 +213,33 @@ + + + + + 75 + true + + + + Last activity + + + + + + + + 75 + true + true + + + + TextLabel + + +