Fix the InlineMessages for the room upgrades in RoomSettings

Fix the InlineMessages for the room upgrades in RoomSettings, they should show even if we aren't currently in the room. Resolve resource can join the predecessor/sucessor if required.

Closes network/neochat#618
This commit is contained in:
James Graham
2024-07-13 15:14:50 +00:00
parent 841607406f
commit 709711c3ca

View File

@@ -360,11 +360,13 @@ FormCard.FormCardPage {
} }
Kirigami.InlineMessage { Kirigami.InlineMessage {
Layout.fillWidth: true
Layout.maximumWidth: Kirigami.Units.gridUnit * 30 Layout.maximumWidth: Kirigami.Units.gridUnit * 30
Layout.topMargin: Kirigami.Units.largeSpacing
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
text: i18n("This room continues another conversation.") text: i18n("This room continues another conversation.")
type: Kirigami.MessageType.Information type: Kirigami.MessageType.Information
visible: room.predecessorId && room.connection.room(room.predecessorId) visible: room.predecessorId
actions: Kirigami.Action { actions: Kirigami.Action {
text: i18n("See older messages…") text: i18n("See older messages…")
onTriggered: { onTriggered: {
@@ -374,11 +376,13 @@ FormCard.FormCardPage {
} }
} }
Kirigami.InlineMessage { Kirigami.InlineMessage {
Layout.fillWidth: true
Layout.maximumWidth: Kirigami.Units.gridUnit * 30 Layout.maximumWidth: Kirigami.Units.gridUnit * 30
Layout.topMargin: Kirigami.Units.largeSpacing
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
text: i18n("This room has been replaced.") text: i18n("This room has been replaced.")
type: Kirigami.MessageType.Information type: Kirigami.MessageType.Information
visible: room.successorId && room.connection.room(room.successorId) visible: room.successorId
actions: Kirigami.Action { actions: Kirigami.Action {
text: i18n("See new room…") text: i18n("See new room…")
onTriggered: { onTriggered: {