Improve member list highlighted item behavior
- When focusing the "Filter members" field, highlight the first item if none already is - When pressing esc in the field, clear any highlight
This commit is contained in:
parent
08f15b6a01
commit
affd0d0bd3
2
TODO.md
2
TODO.md
|
@ -1,5 +1,7 @@
|
||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
|
- event menu key right click
|
||||||
|
- composer menu?
|
||||||
- fix members not synced bug
|
- fix members not synced bug
|
||||||
- fix local unread counters order
|
- fix local unread counters order
|
||||||
- fix highlight when logging in to new account
|
- fix highlight when logging in to new account
|
||||||
|
|
|
@ -84,10 +84,19 @@ HColumnLayout {
|
||||||
py.callCoro("set_substring_filter", [modelSyncId, text])
|
py.callCoro("set_substring_filter", [modelSyncId, text])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onFocusChanged: if (
|
||||||
|
focus &&
|
||||||
|
stackView.depth === 1 &&
|
||||||
|
stackView.currentItem.currentIndex === -1
|
||||||
|
) stackView.currentItem.currentIndex = 0
|
||||||
|
|
||||||
Keys.forwardTo: [stackView.currentItem]
|
Keys.forwardTo: [stackView.currentItem]
|
||||||
Keys.priority: Keys.AfterItem
|
Keys.priority: Keys.AfterItem
|
||||||
|
|
||||||
Keys.onEscapePressed: {
|
Keys.onEscapePressed: {
|
||||||
|
if (stackView.depth === 1)
|
||||||
|
stackView.currentItem.currentIndex = -1
|
||||||
|
|
||||||
roomPane.toggleFocus()
|
roomPane.toggleFocus()
|
||||||
if (window.settings.clearMemberFilterOnEscape) text = ""
|
if (window.settings.clearMemberFilterOnEscape) text = ""
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user