Fix banners not live-updating

This commit is contained in:
miruka 2019-04-21 15:34:08 -04:00
parent ea8f75c729
commit 4dced63b63
3 changed files with 6 additions and 5 deletions

View File

@ -71,14 +71,16 @@ class Room(ListItem):
displayNameChanged = pyqtSignal("QVariant")
topicChanged = pyqtSignal(str)
typingUsersChanged = pyqtSignal("QVariantList")
inviterChanged = pyqtSignal("QVariant")
leftEventChanged = pyqtSignal("QVariant")
roomId = prop(str, "roomId")
category = prop(str, "category")
category = prop(str, "category", categoryChanged)
displayName = prop(str, "displayName", displayNameChanged)
topic = prop(str, "topic", topicChanged, "")
typingUsers = prop(list, "typingUsers", typingUsersChanged, [])
inviter = prop("QVariant", "inviter")
leftEvent = prop("QVariant", "leftEvent")
inviter = prop("QVariant", "inviter", inviterChanged)
leftEvent = prop("QVariant", "leftEvent", leftEventChanged)
class RoomEvent(ListItem):

View File

@ -9,6 +9,7 @@ ColumnLayout {
readonly property var roomInfo:
Backend.models.rooms.get(userId).getWhere("roomId", roomId)
id: chatPage
spacing: 0
onFocusChanged: sendBox.setFocus()

View File

@ -156,8 +156,6 @@ function getLeftBannerText(leftEvent) {
return "You are not member of this room."
}
console.log(JSON.stringify(leftEvent, null, 4))
var info = leftEvent.content
var prev = leftEvent.prev_content
var reason = info.reason ? (" Reason: " + info.reason) : ""