Merge pull request #2674 from defnax/fixesv4

Added to show on New Board/New Channel feed last updated time
This commit is contained in:
csoler 2023-01-28 14:13:22 +01:00 committed by GitHub
commit 7082372446
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 53 additions and 1 deletions

View File

@ -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 */

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>618</width>
<height>161</height>
<height>176</height>
</rect>
</property>
<property name="font">
@ -221,6 +221,20 @@
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="infoLastPostLabel">
<property name="text">
<string>Last activity</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="infoLastPost">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="1">

View File

@ -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)) {

View File

@ -213,6 +213,33 @@
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="infoLastPostLabel">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Last activity</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="infoLastPost">
<property name="font">
<font>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="1">