From 683a24d2aaaddbc9b8fab87a29361028949ac0ef Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Fri, 2 Jul 2021 12:36:33 +0200 Subject: [PATCH] Fix community sidebar toggle --- resources/qml/ChatPage.qml | 2 ++ src/UserSettingsPage.cpp | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/resources/qml/ChatPage.qml b/resources/qml/ChatPage.qml index cd323a97..3fa55b42 100644 --- a/resources/qml/ChatPage.qml +++ b/resources/qml/ChatPage.qml @@ -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 diff --git a/src/UserSettingsPage.cpp b/src/UserSettingsPage.cpp index 6c0d8728..740b8979 100644 --- a/src/UserSettingsPage.cpp +++ b/src/UserSettingsPage.cpp @@ -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(); }