diff --git a/TODO.md b/TODO.md index fdc09830..37804d18 100644 --- a/TODO.md +++ b/TODO.md @@ -98,6 +98,7 @@ - Links preview - Client improvements + - Config file format - Set Qt.application.* stuff from C++ - [debug mode](https://docs.python.org/3/library/asyncio-dev.html) - Initial sync filter and lazy load, see weechat-matrix `_handle_login()` diff --git a/src/python/config_files.py b/src/python/config_files.py index 0fad5c43..b654623a 100644 --- a/src/python/config_files.py +++ b/src/python/config_files.py @@ -104,6 +104,11 @@ class UISettings(JSONConfigFile): return { "theme": "Default.qpl", "writeAliases": {}, + "keys": { + "scrollUp": ["Alt+Up", "Alt+K"], + "scrollDown": ["Alt+Down", "Alt+J"], + "startDebugger": ["Alt+Shift+D"], + }, } diff --git a/src/qml/Chat/Timeline/EventList.qml b/src/qml/Chat/Timeline/EventList.qml index 8ce9688d..1d1a9f94 100644 --- a/src/qml/Chat/Timeline/EventList.qml +++ b/src/qml/Chat/Timeline/EventList.qml @@ -76,12 +76,12 @@ HRectangle { // Declaring this as "alias" provides the on... signal property real yPos: visibleArea.yPosition property bool canLoad: true - property int zz: 0 + // property int zz: 0 onYPosChanged: { if (chatPage.category != "Invites" && canLoad && yPos <= 0.1) { - zz += 1 - print(canLoad, zz) + // zz += 1 + // print(canLoad, zz) eventList.canLoad = false py.callClientCoro( chatPage.userId, "load_past_events", [chatPage.roomId], diff --git a/src/qml/Shortcuts.qml b/src/qml/Shortcuts.qml index d8d0cd05..258909a5 100644 --- a/src/qml/Shortcuts.qml +++ b/src/qml/Shortcuts.qml @@ -18,17 +18,17 @@ Item { } Shortcut { - sequences: ["Alt+Up", "Alt+K"] + sequences: settings.keys ? settings.keys.scrollUp : [] onActivated: smartVerticalFlick(-335) } Shortcut { - sequences: ["Alt+Down", "Alt+J"] + sequences: settings.keys ? settings.keys.scrollDown : [] onActivated: smartVerticalFlick(335) } Shortcut { - sequence: "Alt+Shift+D" + sequence: settings.keys ? settings.keys.startDebugger : [] onActivated: if (window.debug) { py.call("APP.pdb") } }