From 20f9a86ad96ced0924fe40d19ca64155cd228032 Mon Sep 17 00:00:00 2001 From: Andreas Gattringer Date: Mon, 15 Jul 2024 15:35:01 +0200 Subject: [PATCH] stop assigning undefined to bool in TimelineView and MessageDelegate --- src/qml/TimelineView.qml | 2 +- src/timeline/MessageDelegate.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qml/TimelineView.qml b/src/qml/TimelineView.qml index a4d21781f..f7689ba89 100644 --- a/src/qml/TimelineView.qml +++ b/src/qml/TimelineView.qml @@ -190,7 +190,7 @@ QQC2.ScrollView { implicitHeight: Kirigami.Units.gridUnit * 2 z: 2 - visible: root.currentRoom && root.currentRoom.hasUnreadMessages + visible: root.currentRoom?.hasUnreadMessages || false text: root.currentRoom.readMarkerLoaded ? i18n("Jump to first unread message") : i18n("Jump to oldest loaded message") action: Kirigami.Action { diff --git a/src/timeline/MessageDelegate.qml b/src/timeline/MessageDelegate.qml index b1aac8e1e..7d014da60 100644 --- a/src/timeline/MessageDelegate.qml +++ b/src/timeline/MessageDelegate.qml @@ -245,7 +245,7 @@ TimelineDelegate { topMargin: Kirigami.Units.smallSpacing } - visible: root.contentModel?.showAuthor && Config.showAvatarInTimeline && (Config.compactLayout || !_private.showUserMessageOnRight) + visible: root.contentModel?.showAuthor || false && Config.showAvatarInTimeline && (Config.compactLayout || !_private.showUserMessageOnRight) name: root.author.displayName source: root.author.avatarUrl color: root.author.color