Fix ForgetRoomPopup destruction/callback

This commit is contained in:
miruka
2019-09-09 20:56:10 -04:00
parent 3e01eeef71
commit 988ab94772
5 changed files with 30 additions and 14 deletions

View File

@@ -24,19 +24,16 @@ Banner {
forget: button => {
Utils.makePopup(
"Popups/ForgetRoomPopup.qml",
chatPage,
mainUI, // Must not be destroyed with chatPage
{
userId: chatPage.userId,
roomId: chatPage.roomId,
roomName: chatPage.roomInfo.display_name,
forgottenCallback: () => {
button.loading = false
Qt.callLater(pageLoader.showPage, "Default")
},
userId: chatPage.userId,
roomId: chatPage.roomId,
roomName: chatPage.roomInfo.display_name,
},
obj => {
obj.onOk.connect(() => { button.loading = true })
},
false,
)
}
})