Update LeftBanner, fix forget button crash
This commit is contained in:
@@ -2,12 +2,12 @@ import QtQuick 2.12
|
||||
import "../../Base"
|
||||
|
||||
Banner {
|
||||
property string userId: ""
|
||||
|
||||
color: theme.chat.leftBanner.background
|
||||
|
||||
// TODO: avatar func auto
|
||||
avatar.userId: userId
|
||||
avatar.userId: chatPage.userId
|
||||
avatar.displayName: chatPage.userInfo.display_name
|
||||
avatar.avatarUrl: chatPage.userInfo.avatar_url
|
||||
labelText: qsTr("You are not part of this room anymore.")
|
||||
|
||||
buttonModel: [
|
||||
|
@@ -9,7 +9,11 @@ HPage {
|
||||
property string userId: ""
|
||||
property string roomId: ""
|
||||
|
||||
property bool ready: roomInfo !== "waiting"
|
||||
property bool ready: userInfo !== "waiting" && roomInfo !== "waiting"
|
||||
|
||||
readonly property var userInfo:
|
||||
Utils.getItem(modelSources["Account"] || [], "user_id", userId) ||
|
||||
"waiting"
|
||||
|
||||
readonly property var roomInfo: Utils.getItem(
|
||||
modelSources[["Room", userId]] || [], "room_id", roomId
|
||||
|
@@ -15,7 +15,6 @@ HSplitView {
|
||||
EventList {
|
||||
// Avoid a certain binding loop
|
||||
Layout.minimumWidth: theme.minimumSupportedWidth
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
@@ -26,9 +25,8 @@ HSplitView {
|
||||
|
||||
InviteBanner {
|
||||
id: inviteBanner
|
||||
visible: Boolean(inviterId)
|
||||
visible: ! chatPage.roomInfo.left && inviterId
|
||||
inviterId: chatPage.roomInfo.inviter_id
|
||||
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
@@ -40,8 +38,6 @@ HSplitView {
|
||||
LeftBanner {
|
||||
id: leftBanner
|
||||
visible: chatPage.roomInfo.left
|
||||
userId: chatPage.userId
|
||||
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user