added # of posts at friends and locally in channels

This commit is contained in:
csoler 2020-09-04 14:50:12 +02:00
parent b40c329596
commit 9005f22395
3 changed files with 58 additions and 48 deletions

View File

@ -107,6 +107,8 @@ public:
std::vector<std::pair<time_t,RsGxsMessageId> > getPostVersions(const RsGxsMessageId& mid) const;
uint32_t getNumberOfPosts() { return mPosts.size() ; }
// This method will asynchroneously update the data
void updateChannel(const RsGxsGroupId& channel_group_id);
const RsGxsGroupId& currentGroupId() const;

View File

@ -753,6 +753,8 @@ void GxsChannelPostsWidgetWithModel::postChannelPostLoad()
ui->channelFiles_TV->setAutoSelect(true);
ui->channelFiles_TV->sortByColumn(0, Qt::AscendingOrder);
ui->infoPosts->setText(QString::number(mChannelPostsModel->getNumberOfPosts()) + " / " + QString::number(mGroup.mMeta.mVisibleMsgCount));
}
void GxsChannelPostsWidgetWithModel::updateDisplay(bool complete)
@ -953,6 +955,7 @@ void GxsChannelPostsWidgetWithModel::insertChannelDetails(const RsGxsChannelGrou
ui->infoPosts->setText(QString::number(group.mMeta.mVisibleMsgCount));
if(group.mMeta.mLastPost==0)
ui->infoLastPost->setText(tr("Never"));
else

View File

@ -87,7 +87,7 @@
<string>Add new post</string>
</property>
<property name="icon">
<iconset>
<iconset resource="../icons.qrc">
<normaloff>:/icons/png/add.png</normaloff>:/icons/png/add.png</iconset>
</property>
<property name="iconSize">
@ -181,7 +181,7 @@
<item>
<widget class="QTabWidget" name="channel_TW">
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="tab_3">
<attribute name="title">
@ -219,26 +219,6 @@
</item>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="3">
<widget class="QLabel" name="infoLastPost">
<property name="text">
<string notr="true">unknown</string>
</property>
</widget>
</item>
<item row="4" column="1" colspan="2">
<widget class="QLabel" name="label_2">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Created:</string>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="GxsIdLabel" name="infoAdministrator">
<property name="text">
@ -249,26 +229,6 @@
</property>
</widget>
</item>
<item row="3" column="1" colspan="2">
<widget class="QLabel" name="label_3">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Distribution:</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="infoPosts">
<property name="text">
<string notr="true">0</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QLabel" name="infoLastPostLabel">
<property name="sizePolicy">
@ -288,8 +248,8 @@
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QLabel" name="infoDistribution">
<item row="4" column="3">
<widget class="QLabel" name="infoCreated">
<property name="text">
<string>unknown</string>
</property>
@ -308,8 +268,48 @@
</property>
</widget>
</item>
<item row="4" column="3">
<widget class="QLabel" name="infoCreated">
<item row="1" column="3">
<widget class="QLabel" name="infoLastPost">
<property name="text">
<string notr="true">unknown</string>
</property>
</widget>
</item>
<item row="3" column="1" colspan="2">
<widget class="QLabel" name="label_3">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Distribution:</string>
</property>
</widget>
</item>
<item row="4" column="1" colspan="2">
<widget class="QLabel" name="label_2">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Created:</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="infoPosts">
<property name="text">
<string notr="true">0</string>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QLabel" name="infoDistribution">
<property name="text">
<string>unknown</string>
</property>
@ -329,8 +329,11 @@
<bold>true</bold>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;justify&quot;&gt;The number of posts at friends is progressively updated.&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;The new numbers will show next time you load this channel.&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;The two numbers differ depending on your friends synchronization&lt;/p&gt;&lt;p&gt;time limits as well as yours.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Posts:</string>
<string>Posts (locally / at friends):</string>
</property>
</widget>
</item>
@ -614,6 +617,8 @@ p, li { white-space: pre-wrap; }
<header>gui/common/LineEditClear.h</header>
</customwidget>
</customwidgets>
<resources/>
<resources>
<include location="../icons.qrc"/>
</resources>
<connections/>
</ui>