mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-26 13:08:48 +03:00
Sort room list on setting change
This commit is contained in:
parent
2320bfea26
commit
abac4c8d34
2 changed files with 10 additions and 1 deletions
|
@ -65,6 +65,10 @@ RoomList::RoomList(QSharedPointer<UserSettings> userSettings, QWidget *parent)
|
||||||
topLayout_->addWidget(scrollArea_);
|
topLayout_->addWidget(scrollArea_);
|
||||||
|
|
||||||
connect(this, &RoomList::updateRoomAvatarCb, this, &RoomList::updateRoomAvatar);
|
connect(this, &RoomList::updateRoomAvatarCb, this, &RoomList::updateRoomAvatar);
|
||||||
|
connect(userSettings.get(),
|
||||||
|
&UserSettings::roomSortingChanged,
|
||||||
|
this,
|
||||||
|
&RoomList::sortRoomsByLastMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -87,7 +87,11 @@ public:
|
||||||
save();
|
save();
|
||||||
}
|
}
|
||||||
|
|
||||||
void setIgnoreMinorEvents(bool state) { ignoreMinorEvents_ = state; }
|
void setIgnoreMinorEvents(bool state)
|
||||||
|
{
|
||||||
|
ignoreMinorEvents_ = state;
|
||||||
|
emit roomSortingChanged();
|
||||||
|
}
|
||||||
|
|
||||||
void setButtonsInTimeline(bool state)
|
void setButtonsInTimeline(bool state)
|
||||||
{
|
{
|
||||||
|
@ -124,6 +128,7 @@ public:
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void groupViewStateChanged(bool state);
|
void groupViewStateChanged(bool state);
|
||||||
|
void roomSortingChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Default to system theme if QT_QPA_PLATFORMTHEME var is set.
|
// Default to system theme if QT_QPA_PLATFORMTHEME var is set.
|
||||||
|
|
Loading…
Reference in a new issue