diff --git a/resources/qml/RoomList.qml b/resources/qml/RoomList.qml index 66cbac5a..576383e2 100644 --- a/resources/qml/RoomList.qml +++ b/resources/qml/RoomList.qml @@ -33,7 +33,8 @@ Page { Connections { function onCurrentRoomChanged() { - roomlist.positionViewAtIndex(Rooms.roomidToIndex(Rooms.currentRoom.roomId), ListView.Contain); + if (Rooms.currentRoom) + roomlist.positionViewAtIndex(Rooms.roomidToIndex(Rooms.currentRoom.roomId), ListView.Contain); } target: Rooms diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml index 6fc9d51b..5e99ee5c 100644 --- a/resources/qml/TimelineView.qml +++ b/resources/qml/TimelineView.qml @@ -85,9 +85,13 @@ Item { target: timelineView } - MessageView { + Loader { + active: room || roomPreview Layout.fillWidth: true - implicitHeight: msgView.height - typingIndicator.height + sourceComponent: MessageView { + implicitHeight: msgView.height - typingIndicator.height + } + } Loader {