diff --git a/src/RoomList.cpp b/src/RoomList.cpp index a9ce957a..13a4fa67 100644 --- a/src/RoomList.cpp +++ b/src/RoomList.cpp @@ -65,6 +65,10 @@ RoomList::RoomList(QSharedPointer userSettings, QWidget *parent) topLayout_->addWidget(scrollArea_); connect(this, &RoomList::updateRoomAvatarCb, this, &RoomList::updateRoomAvatar); + connect(userSettings.get(), + &UserSettings::roomSortingChanged, + this, + &RoomList::sortRoomsByLastMessage); } void diff --git a/src/UserSettingsPage.h b/src/UserSettingsPage.h index a1bc4ffc..d47ceb83 100644 --- a/src/UserSettingsPage.h +++ b/src/UserSettingsPage.h @@ -87,7 +87,11 @@ public: save(); } - void setIgnoreMinorEvents(bool state) { ignoreMinorEvents_ = state; } + void setIgnoreMinorEvents(bool state) + { + ignoreMinorEvents_ = state; + emit roomSortingChanged(); + } void setButtonsInTimeline(bool state) { @@ -124,6 +128,7 @@ public: signals: void groupViewStateChanged(bool state); + void roomSortingChanged(); private: // Default to system theme if QT_QPA_PLATFORMTHEME var is set.