diff options
author | Jedi18 <targetakhil@gmail.com> | 2021-02-23 00:46:40 +0530 |
---|---|---|
committer | Jedi18 <targetakhil@gmail.com> | 2021-02-23 00:46:40 +0530 |
commit | ee232c5c60740921f7f3a72a97e46b2523882441 (patch) | |
tree | 72ac5ad41ce1245002b30c41b05b7d7981121f73 | |
parent | enter key now works, fix room highlighting and add overlay (diff) | |
download | nheko-ee232c5c60740921f7f3a72a97e46b2523882441.tar.xz |
fix timeline focus
-rw-r--r-- | resources/qml/TimelineView.qml | 1 | ||||
-rw-r--r-- | src/timeline/TimelineViewManager.cpp | 6 | ||||
-rw-r--r-- | src/timeline/TimelineViewManager.h | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml index 8c84c145..02032393 100644 --- a/resources/qml/TimelineView.qml +++ b/resources/qml/TimelineView.qml @@ -79,6 +79,7 @@ Page { sequence: "Ctrl+L" onActivated: { var quickSwitch = quickSwitcherComponent.createObject(timelineRoot); + TimelineManager.focusTimeline() quickSwitch.open(); } } diff --git a/src/timeline/TimelineViewManager.cpp b/src/timeline/TimelineViewManager.cpp index 49072ef4..7d74496d 100644 --- a/src/timeline/TimelineViewManager.cpp +++ b/src/timeline/TimelineViewManager.cpp @@ -587,4 +587,10 @@ TimelineViewManager::completerFor(QString completerName, QString roomId) return proxy; } return nullptr; +} + +void +TimelineViewManager::focusTimeline() +{ + getWidget()->setFocus(); } \ No newline at end of file diff --git a/src/timeline/TimelineViewManager.h b/src/timeline/TimelineViewManager.h index dfc2e386..f1c360ef 100644 --- a/src/timeline/TimelineViewManager.h +++ b/src/timeline/TimelineViewManager.h @@ -101,6 +101,7 @@ public slots: void setHistoryView(const QString &room_id); void highlightRoom(const QString &room_id); + void focusTimeline(); TimelineModel *getHistoryView(const QString &room_id) { auto room = models.find(room_id); |