Fix roompage up/down button highlights

Set the focus to the chatbar after clicking the jump up/down buttons so that they don't stay highlighted.
Also remove messageListView.headerItem.height as part of the down button margin calc as it no longer exists

BUG: 456075
This commit is contained in:
James Graham
2022-11-28 18:43:52 +00:00
parent f3d7fbc483
commit af40860315

View File

@@ -348,6 +348,7 @@ Kirigami.ScrollablePage {
visible: currentRoom && currentRoom.hasUnreadMessages && currentRoom.readMarkerLoaded
action: Kirigami.Action {
onTriggered: {
chatBox.focusInputField();
messageListView.goToEvent(currentRoom.readMarkerEventId)
}
icon.name: "go-up"
@@ -360,7 +361,7 @@ Kirigami.ScrollablePage {
QQC2.RoundButton {
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.bottomMargin: Kirigami.Units.largeSpacing + messageListView.headerItem.height
anchors.bottomMargin: Kirigami.Units.largeSpacing
anchors.rightMargin: Kirigami.Units.largeSpacing
implicitWidth: Kirigami.Units.gridUnit * 2
implicitHeight: Kirigami.Units.gridUnit * 2
@@ -371,6 +372,7 @@ Kirigami.ScrollablePage {
visible: !messageListView.atYEnd
action: Kirigami.Action {
onTriggered: {
chatBox.focusInputField();
goToLastMessage();
currentRoom.markAllMessagesAsRead();
}