Fix the mobile title sometimes disappearing

I was depending on an implicit connection property from somewhere.
This commit is contained in:
Joshua Goins
2026-02-10 20:29:59 -05:00
parent f5d726989f
commit be65d506c4
2 changed files with 3 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ import org.kde.neochat
RowLayout {
id: root
required property NeoChatConnection connection
property bool collapsed: false
signal search
@@ -36,7 +37,7 @@ RowLayout {
} else if(RoomManager.currentSpace === 'DM') {
return i18nc("@title", "Direct Messages");
}
return root.connection.room(RoomManager.currentSpace).displayName;
return root.connection.room(RoomManager.currentSpace)?.displayName;
}
return i18nc("@title List of rooms", "Rooms");
}

View File

@@ -270,6 +270,7 @@ Kirigami.Page {
Component {
id: exploreComponent
ExploreComponent {
connection: root.connection
collapsed: root.collapsed
onSearch: root.search()