From a15fba92cb667acc5507e6fafdead74519c51eb8 Mon Sep 17 00:00:00 2001 From: miruka Date: Sat, 7 Sep 2019 16:39:14 -0400 Subject: [PATCH] Add clearRoomFilterOnEnter setting, default true --- src/python/config_files.py | 1 + src/qml/SidePane/SidePane.qml | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/python/config_files.py b/src/python/config_files.py index bff0dbb3..5642674b 100644 --- a/src/python/config_files.py +++ b/src/python/config_files.py @@ -105,6 +105,7 @@ class UISettings(JSONConfigFile): async def default_data(self) -> JsonData: return { "alertOnMessageForMsec": 4000, + "clearRoomFilterOnEnter": True, "theme": "Default.qpl", "writeAliases": {}, "keys": { diff --git a/src/qml/SidePane/SidePane.qml b/src/qml/SidePane/SidePane.qml index 0fc0120b..a5833a47 100644 --- a/src/qml/SidePane/SidePane.qml +++ b/src/qml/SidePane/SidePane.qml @@ -89,6 +89,10 @@ Rectangle { Keys.onReturnPressed: if (event.modifiers & Qt.ShiftModifier) { sidePaneList.toggleCollapseAccount() } else { + if (window.settings.clearRoomFilterOnEnter) { + mainUI.sidePane.toolBar.roomFilter = "" + } + sidePaneList.activate() }