Reset room pane state when recycling chat page
Side effect: the members filter field's text is no longer saved to disk
This commit is contained in:
@@ -22,8 +22,6 @@ Item {
|
||||
property string replyToUserId: ""
|
||||
property string replyToDisplayName: ""
|
||||
|
||||
readonly property string pageIdentity: userId + "/" + roomId
|
||||
|
||||
readonly property alias loader: loader
|
||||
readonly property alias roomPane: roomPaneLoader.item
|
||||
|
||||
@@ -39,7 +37,6 @@ Item {
|
||||
}
|
||||
|
||||
|
||||
onPageIdentityChanged: if (roomPane) roomPane.appearAnimation.restart()
|
||||
onFocusChanged: if (focus && loader.item) loader.item.composer.takeFocus()
|
||||
onReadyChanged: longLoading = false
|
||||
|
||||
@@ -127,6 +124,11 @@ Item {
|
||||
factor: 2
|
||||
running: true
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: pageLoader
|
||||
function onRecycled() { roomPane.appearAnimation.restart() }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -14,6 +14,15 @@ HColumnLayout {
|
||||
readonly property alias filterField: filterField
|
||||
|
||||
|
||||
Connections {
|
||||
target: pageLoader
|
||||
|
||||
function onAboutToRecycle() {
|
||||
stackView.pop(stackView.initialItem)
|
||||
filterField.reset()
|
||||
}
|
||||
}
|
||||
|
||||
HStackView {
|
||||
id: stackView
|
||||
|
||||
@@ -79,8 +88,6 @@ HColumnLayout {
|
||||
|
||||
HTextField {
|
||||
id: filterField
|
||||
saveName: "memberFilterField"
|
||||
saveId: chat.roomId
|
||||
|
||||
backgroundColor:
|
||||
theme.chat.roomPane.bottomBar.filterMembers.background
|
||||
|
@@ -90,11 +90,20 @@ MultiviewPane {
|
||||
target: swipeView
|
||||
|
||||
function onCurrentItemChanged() {
|
||||
swipeView.currentItem.keybindFocusItem.forceActiveFocus()
|
||||
roomPane.swipeView.currentItem.keybindFocusItem.forceActiveFocus()
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: pageLoader
|
||||
|
||||
function onAboutToRecycle() {
|
||||
roomPane.swipeView.currentIndex = 0
|
||||
}
|
||||
}
|
||||
|
||||
MemberView {}
|
||||
|
||||
SettingsView {
|
||||
enabled: accountModel.presence !== "offline"
|
||||
}
|
||||
|
@@ -80,6 +80,11 @@ HFlickableColumnPage {
|
||||
onKeyboardAccept: if (applyButton.enabled) applyButton.clicked()
|
||||
onKeyboardCancel: cancel()
|
||||
|
||||
Connections {
|
||||
target: pageLoader
|
||||
function onAboutToRecycle() { cancel() }
|
||||
}
|
||||
|
||||
HRoomAvatar {
|
||||
id: avatar
|
||||
clientUserId: chat.userId
|
||||
|
@@ -576,8 +576,8 @@ Rectangle {
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: chat
|
||||
function onPageIdentityChanged() { eventList.moreToLoad = true }
|
||||
target: pageLoader
|
||||
function onRecycled() { eventList.moreToLoad = true }
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user