From c9a92bc58a84160981d07677adf2643540aeb3a3 Mon Sep 17 00:00:00 2001 From: csoler Date: Thu, 28 Jan 2021 21:14:43 +0100 Subject: [PATCH] added last seen display info in circles to help debugging auto-cleaning of circles --- libretroshare/src/gxs/rsgenexchange.cc | 7 ++++++- libretroshare/src/gxs/rsgenexchange.h | 2 +- libretroshare/src/retroshare/rsgxsifacetypes.h | 7 ++++--- libretroshare/src/services/p3gxscircles.cc | 14 ++++++++++++++ libretroshare/src/services/p3gxscircles.h | 1 + retroshare-gui/src/gui/Identity/IdDialog.cpp | 7 ++++++- 6 files changed, 32 insertions(+), 6 deletions(-) diff --git a/libretroshare/src/gxs/rsgenexchange.cc b/libretroshare/src/gxs/rsgenexchange.cc index af0e83fc3..4439f4807 100644 --- a/libretroshare/src/gxs/rsgenexchange.cc +++ b/libretroshare/src/gxs/rsgenexchange.cc @@ -1379,7 +1379,12 @@ bool RsGenExchange::getGroupMeta(const uint32_t &token, std::listsecond; +} bool p3GxsCircles::service_checkIfGroupIsStillUsed(const RsGxsGrpMetaData& meta) { #ifdef GXSFORUMS_CHANNELS diff --git a/libretroshare/src/services/p3gxscircles.h b/libretroshare/src/services/p3gxscircles.h index 8bdce3756..2fb2429ee 100644 --- a/libretroshare/src/services/p3gxscircles.h +++ b/libretroshare/src/services/p3gxscircles.h @@ -290,6 +290,7 @@ public: virtual void updateGroup(uint32_t &token, RsGxsCircleGroup &group) override; virtual bool service_checkIfGroupIsStillUsed(const RsGxsGrpMetaData& meta) override; + virtual rstime_t service_getLastGroupUsageTs(const RsGxsGroupId&) override; /* membership management for external circles */ diff --git a/retroshare-gui/src/gui/Identity/IdDialog.cpp b/retroshare-gui/src/gui/Identity/IdDialog.cpp index bffed9508..4e319860b 100644 --- a/retroshare-gui/src/gui/Identity/IdDialog.cpp +++ b/retroshare-gui/src/gui/Identity/IdDialog.cpp @@ -695,7 +695,12 @@ void IdDialog::loadCircles(const std::list& groupInfo) if(am_I_subscribed) tooltip += tr("subscribed (Receive/forward membership requests from others and invite list).") ; else - tooltip += tr("unsubscribed (Only receive invite list).") ; + { + if(vit->mLastSeen>0) + tooltip += tr("unsubscribed (Only receive invite list). Last seen: %1 days ago.").arg( (time(nullptr)-vit->mLastSeen)/86400 ); + else + tooltip += tr("unsubscribed (Only receive invite list)."); + } tooltip += "\n"+tr("Your status: ") ;