Don't try to load more messages than there are in the timeline
The function call from qml is removed because it is redundant
This commit is contained in:
@@ -407,12 +407,6 @@ Kirigami.ScrollablePage {
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
if (currentRoom) {
|
||||
if (currentRoom.timelineSize < 20) {
|
||||
currentRoom.getPreviousContent(50);
|
||||
}
|
||||
}
|
||||
|
||||
positionViewAtBeginning();
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ void MessageEventModel::setRoom(NeoChatRoom *room)
|
||||
if (room) {
|
||||
m_lastReadEventIndex = QPersistentModelIndex(QModelIndex());
|
||||
room->setDisplayed();
|
||||
if (m_currentRoom->timelineSize() < 10) {
|
||||
if (m_currentRoom->timelineSize() < 10 && !room->allHistoryLoaded()) {
|
||||
room->getPreviousContent(50);
|
||||
}
|
||||
lastReadEventId = room->readMarkerEventId();
|
||||
|
||||
Reference in New Issue
Block a user