From 0ab3bfd4f348afcaebc68f607c3f87e5eea73956 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Thu, 10 Oct 2024 20:55:15 +0200 Subject: [PATCH] Fix crash when opening invitation There seem to be problems with the model not updating correctly when the room is set. This fix is a bit dirty, but seems to work well enough BUG: 493197 --- src/models/timelinemodel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models/timelinemodel.cpp b/src/models/timelinemodel.cpp index 2f9874728..6af8bf367 100644 --- a/src/models/timelinemodel.cpp +++ b/src/models/timelinemodel.cpp @@ -94,7 +94,7 @@ int TimelineBeginningModel::rowCount(const QModelIndex &parent) const { Q_UNUSED(parent) if (m_room == nullptr) { - return 0; + return 1; } return m_room->successorId().isEmpty() ? 0 : 1; } @@ -159,7 +159,7 @@ int TimelineEndModel::rowCount(const QModelIndex &parent) const { Q_UNUSED(parent) if (m_room == nullptr) { - return 0; + return 1; } return m_room->predecessorId().isEmpty() ? 1 : (m_room->allHistoryLoaded() ? 2 : 1); }