From ea346b5d2a7d24da615305f5ef40e1cd6171cd55 Mon Sep 17 00:00:00 2001 From: csoler Date: Thu, 27 Apr 2023 22:46:07 +0200 Subject: [PATCH 1/2] fixed keeping new zoom size when resizing the channel post window --- .../src/gui/gxschannels/GxsChannelPostsWidgetWithModel.cpp | 5 +++++ .../src/gui/gxschannels/GxsChannelPostsWidgetWithModel.h | 1 + 2 files changed, 6 insertions(+) diff --git a/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.cpp b/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.cpp index b36a3cc5c..1865019ec 100644 --- a/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.cpp +++ b/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.cpp @@ -504,6 +504,11 @@ GxsChannelPostsWidgetWithModel::GxsChannelPostsWidgetWithModel(const RsGxsGroupI }, mEventHandlerId, RsEventType::GXS_CHANNELS ); } +void GxsChannelPostsWidgetWithModel::resizeEvent(QResizeEvent *e) +{ + GxsMessageFrameWidget::resizeEvent(e); + updateZoomFactor(0); +} void GxsChannelPostsWidgetWithModel::currentTabChanged(int t) { switch(t) diff --git a/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.h b/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.h index 874562d32..c325c722b 100644 --- a/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.h +++ b/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.h @@ -138,6 +138,7 @@ protected: /* GxsMessageFrameWidget */ virtual void setAllMessagesReadDo(bool read) override; + virtual void resizeEvent(QResizeEvent *e) override; private slots: void showPostDetails(); From 082603917c12da58ca94bf5cb5a1963a3d2a63fd Mon Sep 17 00:00:00 2001 From: csoler Date: Sun, 7 May 2023 17:09:00 +0200 Subject: [PATCH 2/2] fixed crash in setting posted items as read --- retroshare-gui/src/gui/Posted/PostedItem.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/retroshare-gui/src/gui/Posted/PostedItem.cpp b/retroshare-gui/src/gui/Posted/PostedItem.cpp index dcb5c2c97..06b585614 100644 --- a/retroshare-gui/src/gui/Posted/PostedItem.cpp +++ b/retroshare-gui/src/gui/Posted/PostedItem.cpp @@ -282,16 +282,12 @@ void BasePostedItem::readToggled(bool checked) if (mInFill) { return; } + setReadStatus(false, checked); RsThread::async([this,checked]() { RsGxsGrpMsgIdPair msgPair = std::make_pair(groupId(), messageId()); rsPosted->setPostReadStatus(msgPair, !checked); - - RsQThreadUtils::postToObject( [checked,this]() - { - setReadStatus(false, checked); - }, this ); }); }