attempt at fixing unread msg count to display before GXS service tab is displayed

This commit is contained in:
csoler 2023-07-24 23:45:12 +02:00
parent 1512819200
commit ade297f257
2 changed files with 3 additions and 4 deletions

View File

@ -1176,10 +1176,10 @@ void GxsGroupFrameDialog::updateGroupStatisticsReal(const RsGxsGroupId &groupId)
*/
QTreeWidgetItem *item = ui->groupTreeWidget->getItemFromId(QString::fromStdString(stats.mGrpId.toStdString()));
if (!item)
return;
ui->groupTreeWidget->setUnreadCount(item, mCountChildMsgs ? (stats.mNumThreadMsgsUnread + stats.mNumChildMsgsUnread) : stats.mNumThreadMsgsUnread);
if (item)
ui->groupTreeWidget->setUnreadCount(item, mCountChildMsgs ? (stats.mNumThreadMsgsUnread + stats.mNumChildMsgsUnread) : stats.mNumThreadMsgsUnread);
mCachedGroupStats[groupId] = stats;
getUserNotify()->updateIcon();

View File

@ -46,7 +46,6 @@ protected:
bool mCountChildMsgs; // Count new child messages?
private:
RsGxsUpdateBroadcastBase *mBase;
const GxsGroupFrameDialog *mGroupFrameDialog;
unsigned int mNewThreadMessageCount;