moment/harmonyqml/components/Chat/Banners/LeftBanner.qml

32 lines
739 B
QML
Raw Normal View History

import QtQuick 2.7
import "../../Base"
import "../utils.js" as ChatJS
Banner {
property var leftEvent: null
color: HStyle.chat.leftBanner.background
2019-04-29 01:01:38 +10:00
avatarName: ChatJS.getLeftBannerAvatarName(leftEvent, chatPage.userId)
labelText: ChatJS.getLeftBannerText(leftEvent)
buttonModel: [
{
name: "forget",
text: qsTr("Forget"),
2019-04-27 06:02:20 +10:00
iconName: "forget_room",
}
]
buttonCallbacks: {
"forget": function(button) {
button.loading = true
chatPage.canLoadPastEvents = false
Backend.clientManager.clients[chatPage.userId].forgetRoom(
chatPage.roomId
)
pageStack.clear()
},
}
}