summary refs log tree commit diff
path: root/resources/qml/TimelineView.qml
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2023-12-10 02:59:05 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2023-12-10 02:59:05 +0100
commit791cb660b5d78c112ef16f0c7cecf0942cb396a1 (patch)
tree0545f81c240d19c67d6288df69b1e294b504d165 /resources/qml/TimelineView.qml
parentAdd gitlab windows build (diff)
downloadnheko-791cb660b5d78c112ef16f0c7cecf0942cb396a1.tar.xz
Fix joined spaces having no description
Diffstat (limited to 'resources/qml/TimelineView.qml')
-rw-r--r--resources/qml/TimelineView.qml11
1 files changed, 9 insertions, 2 deletions
diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml
index 006eb57f..f66df94f 100644
--- a/resources/qml/TimelineView.qml
+++ b/resources/qml/TimelineView.qml
@@ -195,10 +195,13 @@ Item {
         RowLayout {
             Layout.alignment: Qt.AlignHCenter
             spacing: Nheko.paddingMedium
+            Layout.fillWidth: true
 
             MatrixText {
+                Layout.preferredWidth: implicitWidth
+                horizontalAlignment: TextEdit.AlignRight
                 font.pixelSize: 24
-                text: !(roomPreview?.isFetched ?? false) ? qsTr("No preview available") : preview.roomName
+                text: (!room && !(roomPreview?.isFetched ?? false)) ? qsTr("No preview available") : preview.roomName
             }
             ImageButton {
                 ToolTip.text: qsTr("Settings")
@@ -214,8 +217,10 @@ Item {
             Layout.alignment: Qt.AlignHCenter
             spacing: Nheko.paddingMedium
             visible: !!room
+            Layout.fillWidth: true
 
             MatrixText {
+                Layout.preferredWidth: implicitWidth
                 text: qsTr("%n member(s)", "", room ? room.roomMemberCount : 0)
             }
             ImageButton {
@@ -232,13 +237,14 @@ Item {
             Layout.fillWidth: true
             Layout.leftMargin: Nheko.paddingLarge
             Layout.rightMargin: Nheko.paddingLarge
+            Layout.maximumHeight: timelineView.height / 3
 
             TextArea {
                 background: null
                 horizontalAlignment: TextEdit.AlignHCenter
                 readOnly: true
                 selectByMouse: true
-                text: (roomPreview?.isFetched ?? false) ? TimelineManager.escapeEmoji(preview.roomTopic) : qsTr("This room is possibly inaccessible. If this room is private, you should remove it from this community.")
+                text: (room || (roomPreview?.isFetched ?? false)) ? TimelineManager.escapeEmoji(preview.roomTopic) : qsTr("This room is possibly inaccessible. If this room is private, you should remove it from this community.")
                 textFormat: TextEdit.RichText
                 wrapMode: TextEdit.WordWrap
 
@@ -280,6 +286,7 @@ Item {
         }
         RowLayout {
             Layout.alignment: Qt.AlignHCenter
+            Layout.fillWidth: true
             spacing: Nheko.paddingMedium
             visible: roomPreview && roomPreview.isInvite && reasonField.showReason