fixed keeping post sizes when selelecting unread posts

This commit is contained in:
csoler 2023-04-25 11:33:37 +02:00
parent 0ff4426d72
commit 35e08e3b66
2 changed files with 1 additions and 5 deletions

View File

@ -173,11 +173,7 @@ void RsGxsChannelPostsModel::updateFilter(uint32_t& count)
{ {
preMods(); preMods();
beginResetModel();
mFilteredPosts.clear(); mFilteredPosts.clear();
//mFilteredPosts.push_back(0);
endResetModel();
for(size_t i=0;i<mPosts.size();++i) for(size_t i=0;i<mPosts.size();++i)
if(postPassesFilter(mPosts[i],mFilteredStrings,mFilterUnread)) if(postPassesFilter(mPosts[i],mFilteredStrings,mFilterUnread))

View File

@ -379,7 +379,7 @@ GxsChannelPostsWidgetWithModel::GxsChannelPostsWidgetWithModel(const RsGxsGroupI
connect(ui->viewType_TB,SIGNAL(clicked()),this,SLOT(switchView())); connect(ui->viewType_TB,SIGNAL(clicked()),this,SLOT(switchView()));
ui->showUnread_TB->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/message-state-unread.png")); ui->showUnread_TB->setIcon(FilesDefs::getIconFromQtResourcePath(":/images/message-state-unread.png"));
ui->showUnread_TB->setChecked(false); whileBlocking(ui->showUnread_TB)->setChecked(false);
ui->showUnread_TB->setToolTip(tr("Show unread posts only")); ui->showUnread_TB->setToolTip(tr("Show unread posts only"));
connect(ui->showUnread_TB,SIGNAL(toggled(bool)),this,SLOT(switchOnlyUnread(bool))); connect(ui->showUnread_TB,SIGNAL(toggled(bool)),this,SLOT(switchOnlyUnread(bool)));