Fix HPage and EventList flickTarget conflict

This commit is contained in:
miruka 2019-11-10 09:38:16 -04:00
parent f2ab84c754
commit 717b18fede
2 changed files with 9 additions and 1 deletions

View File

@ -17,6 +17,8 @@ SwipeView {
property int currentSpacing:
Math.min(theme.spacing * width / 400, theme.spacing)
property bool becomeKeyboardFlickableTarget: true
id: swipeView
clip: true
interactive: sidePane.reduce
@ -75,7 +77,8 @@ SwipeView {
contentWidth: parent.width
contentHeight: contentColumn.childrenRect.height
Component.onCompleted: shortcuts.flickTarget = this
Component.onCompleted:
if (becomeKeyboardFlickableTarget) shortcuts.flickTarget = this
HColumnLayout {
id: contentColumn

View File

@ -5,6 +5,8 @@ import "../utils.js" as Utils
HPage {
id: chatPage
// The target will be our EventList, not the page itself
becomeKeyboardFlickableTarget: false
property string userId: ""
property string roomId: ""
@ -19,6 +21,7 @@ HPage {
modelSources[["Room", userId]] || [], "room_id", roomId
) || "waiting"
onRoomInfoChanged: {
if (roomInfo.left) {
// If left, the room will most likely be gone on client restart.
@ -32,8 +35,10 @@ HPage {
}
}
readonly property bool hasUnknownDevices: false
header: HLoader {
id: roomHeader
source: ready ? "RoomHeader.qml" : ""