Chatbox id for all property refs

Change the chatbox id to root and use for all references to it properties. Using root.currentRoom is needed for the chatbar to be visible in KF6
This commit is contained in:
James Graham
2023-08-04 13:56:26 +00:00
parent fdd8a62873
commit bc4431462a

View File

@@ -30,7 +30,7 @@ import org.kde.neochat 1.0
* @sa ChatBar
*/
ColumnLayout {
id: chatBox
id: root
/**
* @brief The current room that user is viewing.
@@ -63,7 +63,7 @@ ColumnLayout {
ChatBar {
id: chatBar
visible: currentRoom.canSendEvent("m.room.message")
visible: root.currentRoom.canSendEvent("m.room.message")
Layout.fillWidth: true
Layout.minimumHeight: Math.max(Kirigami.Units.gridUnit * 2, implicitHeight + Kirigami.Units.largeSpacing)
@@ -78,7 +78,7 @@ ColumnLayout {
}
onMessageSent: {
chatBox.messageSent();
root.messageSent();
}
}