diff --git a/TODO.md b/TODO.md index 9f0c0044..4951ab77 100644 --- a/TODO.md +++ b/TODO.md @@ -1,8 +1,6 @@ # TODO -- handle `{}` bad `DevicesResponse` - delete devices (do that in key verification popup instead of blacklisting) -- flickshortcuts - avatar upload/change component - device list keyboard navigation @@ -17,7 +15,7 @@ - use new nio `restore_login()` - verify all popups and boxes work: enter/esc, tab focus, operations -- update nio fork, requirements.txt and flatpak nio version +- update requirements.txt and flatpak nio version ## Refactoring diff --git a/src/gui/Base/HFlickableColumnPage.qml b/src/gui/Base/HFlickableColumnPage.qml index de497161..45234bc9 100644 --- a/src/gui/Base/HFlickableColumnPage.qml +++ b/src/gui/Base/HFlickableColumnPage.qml @@ -1,6 +1,7 @@ // SPDX-License-Identifier: LGPL-3.0-or-later import QtQuick 2.12 +import QtQuick.Controls 2.12 import "../ShortcutBundles" HPage { @@ -15,6 +16,9 @@ HPage { property alias flickable: flickable property alias flickShortcuts: flickShortcuts + property bool enableFlickShortcuts: + SwipeView ? SwipeView.isCurrentItem : true + padding: 0 @@ -33,7 +37,7 @@ HPage { FlickShortcuts { id: flickShortcuts - active: ! mainUI.debugConsole.visible + active: ! mainUI.debugConsole.visible && enableFlickShortcuts flickable: flickable } diff --git a/src/gui/Pages/AccountSettings/Sessions.qml b/src/gui/Pages/AccountSettings/Sessions.qml index 00c4d027..cce1d565 100644 --- a/src/gui/Pages/AccountSettings/Sessions.qml +++ b/src/gui/Pages/AccountSettings/Sessions.qml @@ -1,10 +1,12 @@ // SPDX-License-Identifier: LGPL-3.0-or-later import QtQuick 2.12 +import QtQuick.Controls 2.12 import QtQuick.Layouts 1.12 import "../../Base" import "../../Base/ButtonLayout" import "../../PythonBridge" +import "../../ShortcutBundles" HColumnPage { id: page @@ -19,6 +21,9 @@ HColumnPage { property string userId + property bool enableFlickShortcuts: + SwipeView ? SwipeView.isCurrentItem : true + property Future loadFuture: null // property var pr: column.childrenRect.height @@ -112,6 +117,12 @@ HColumnPage { Layout.fillWidth: true Layout.fillHeight: true + FlickShortcuts { + flickable: deviceList + active: + ! mainUI.debugConsole.visible && page.enableFlickShortcuts + } + HLoader { id: busyIndicatorLoader anchors.centerIn: parent diff --git a/src/gui/Pages/Chat/RoomPane/SettingsView.qml b/src/gui/Pages/Chat/RoomPane/SettingsView.qml index 529b8023..31ae50f9 100644 --- a/src/gui/Pages/Chat/RoomPane/SettingsView.qml +++ b/src/gui/Pages/Chat/RoomPane/SettingsView.qml @@ -57,8 +57,7 @@ HFlickableColumnPage { } - flickShortcuts.active: - ! mainUI.debugConsole.visible && ! chat.composerHasFocus + enableFlickShortcuts: ! chat.composerHasFocus background: Rectangle { color: theme.chat.roomPane.roomSettings.background