Fix filter members field after switching room

This commit is contained in:
miruka
2019-05-16 15:47:14 -04:00
parent 5ab13e3e16
commit 1c24edb166
2 changed files with 15 additions and 0 deletions

View File

@@ -31,6 +31,13 @@ HColumnLayout {
placeholderText: qsTr("Filter members")
backgroundColor: HStyle.sidePane.filterRooms.background
// Without this, if the user types in the field, changes of room, then
// comes back, the field will be empty but the filter still applied.
Component.onCompleted:
text = Backend.clients.get(chatPage.userId).getMemberFilter(
chatPage.category, chatPage.roomId
)
onTextChanged: Backend.clients.get(chatPage.userId).setMemberFilter(
chatPage.category, chatPage.roomId, text
)