mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Merge pull request #1506 from defnax/subscribe-button-with-count
Count subscribers on the channels subscribe button like Youtube
This commit is contained in:
commit
da57f80095
@ -244,8 +244,6 @@ void GxsChannelPostsWidget::insertChannelDetails(const RsGxsChannelGroup &group)
|
||||
}
|
||||
ui->logoLabel->setPixmap(chanImage);
|
||||
|
||||
ui->subscribersLabel->setText(QString::number(group.mMeta.mPop)) ;
|
||||
|
||||
if (group.mMeta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_PUBLISH)
|
||||
{
|
||||
mStateHelper->setWidgetEnabled(ui->postButton, true);
|
||||
@ -272,6 +270,9 @@ void GxsChannelPostsWidget::insertChannelDetails(const RsGxsChannelGroup &group)
|
||||
ui->infoWidget->hide();
|
||||
setViewMode(viewMode());
|
||||
|
||||
ui->subscribeToolButton->setText(tr("Subscribed") + " " + QString::number(group.mMeta.mPop) );
|
||||
|
||||
|
||||
ui->infoPosts->clear();
|
||||
ui->infoDescription->clear();
|
||||
} else {
|
||||
@ -332,6 +333,9 @@ void GxsChannelPostsWidget::insertChannelDetails(const RsGxsChannelGroup &group)
|
||||
|
||||
ui->feedToolButton->setEnabled(false);
|
||||
ui->fileToolButton->setEnabled(false);
|
||||
|
||||
ui->subscribeToolButton->setText(tr("Subscribe ") + " " + QString::number(group.mMeta.mPop) );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -622,8 +626,6 @@ void GxsChannelPostsWidget::blank()
|
||||
mStateHelper->setWidgetEnabled(ui->postButton, false);
|
||||
mStateHelper->setWidgetEnabled(ui->subscribeToolButton, false);
|
||||
|
||||
ui->subscribersLabel->setText("") ;
|
||||
|
||||
clearPosts();
|
||||
|
||||
groupNameChanged(QString());
|
||||
|
@ -138,28 +138,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="subscribersLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Subscribers</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="postButton">
|
||||
<property name="focusPolicy">
|
||||
|
Loading…
Reference in New Issue
Block a user