moment/harmonyqml/components/Chat/Chat.qml
miruka 012e89f6cb Improved ListModel and ListItem
- New ListItem implemented using a metaclass, which makes defining new
  ListItem subclasses much cleaner and shorter

- ListModel functions taking an index now accept either an int
  (list index) or str (value of a main key)

- getWhere() gone, simply use get(a_main_key_value) now

- updateOrAppendWhere replaced by update()/upsert()
2019-04-29 23:51:37 -04:00

42 lines
799 B
QML

import QtQuick 2.7
import "../Base"
import "Banners"
import "RoomEventList"
HColumnLayout {
property string userId: ""
property string roomId: ""
readonly property var roomInfo:
Backend.models.rooms.get(userId).get(roomId)
property bool canLoadPastEvents: true
id: chatPage
onFocusChanged: sendBox.setFocus()
RoomHeader {
displayName: roomInfo.displayName
topic: roomInfo.topic || ""
}
RoomEventList {}
TypingUsersBar {}
InviteBanner {
visible: roomInfo.category === "Invites"
inviter: roomInfo.inviter
}
SendBox {
id: sendBox
visible: roomInfo.category === "Rooms"
}
LeftBanner {
visible: roomInfo.category === "Left"
leftEvent: roomInfo.leftEvent
}
}