51386821bc
- Backend.clientManager renamed to Backend.clients - clientManager is now a Mapping subclass Before/After from Python: backend.clientManager.clients[thing] → backend.clients[thing] From QML: Backend.clientManager.clients[thing] → Backend.clients.get(thing)
30 lines
699 B
QML
30 lines
699 B
QML
import QtQuick 2.7
|
|
import "../../Base"
|
|
import "../utils.js" as ChatJS
|
|
|
|
Banner {
|
|
property var leftEvent: null
|
|
|
|
color: HStyle.chat.leftBanner.background
|
|
|
|
avatarName: ChatJS.getLeftBannerAvatarName(leftEvent, chatPage.userId)
|
|
labelText: ChatJS.getLeftBannerText(leftEvent)
|
|
|
|
buttonModel: [
|
|
{
|
|
name: "forget",
|
|
text: qsTr("Forget"),
|
|
iconName: "forget_room",
|
|
}
|
|
]
|
|
|
|
buttonCallbacks: {
|
|
"forget": function(button) {
|
|
button.loading = true
|
|
chatPage.canLoadPastEvents = false
|
|
Backend.clients.get(chatPage.userId).forgetRoom(chatPage.roomId)
|
|
pageStack.clear()
|
|
},
|
|
}
|
|
}
|