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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user