Fix community sidebar toggle

This commit is contained in:
Nicolas Werner 2021-07-02 12:36:33 +02:00
parent d2ba0b6603
commit 683a24d2aa
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
2 changed files with 5 additions and 2 deletions

View file

@ -23,6 +23,8 @@ Rectangle {
AdaptiveLayoutElement {
id: communityListC
visible: Settings.groupView
minimumWidth: communitiesList.avatarSize * 4 + Nheko.paddingMedium * 2
collapsedWidth: communitiesList.avatarSize + 2 * Nheko.paddingMedium
preferredWidth: Settings.communityListWidth >= minimumWidth ? Settings.communityListWidth : collapsedWidth

View file

@ -179,10 +179,11 @@ UserSettings::setMobileMode(bool state)
void
UserSettings::setGroupView(bool state)
{
if (groupView_ != state)
emit groupViewStateChanged(state);
if (groupView_ == state)
return;
groupView_ = state;
emit groupViewStateChanged(state);
save();
}