Fix the TimelineEnd delegate not appearing when going back in history

It was possible to make this appear if you switched rooms while you had
all history loaded, but now it should show up naturally.
This commit is contained in:
Joshua Goins
2026-02-20 16:16:49 -05:00
parent f6abbda1e3
commit 3b00e14a9d

View File

@@ -79,10 +79,8 @@ void TimelineBeginningModel::setRoom(NeoChatRoom *room)
if (m_room != nullptr) {
Quotient::connectUntil(m_room.get(), &Quotient::Room::eventsHistoryJobChanged, this, [this]() {
if (m_room && m_room->allHistoryLoaded()) {
// HACK: We have to do it this way because DelegateChooser doesn't update dynamically.
beginRemoveRows({}, 0, 0);
endRemoveRows();
beginInsertRows({}, 0, 0);
Q_EMIT dataChanged(index(0, 0), index(0, 0), {DelegateTypeRole});
beginInsertRows({}, 1, 1);
endInsertRows();
return true;
}