Minor optimization
This commit is contained in:
@@ -221,7 +221,6 @@ Kirigami.ScrollablePage {
|
|||||||
visible: !invitation.visible
|
visible: !invitation.visible
|
||||||
|
|
||||||
readonly property int largestVisibleIndex: count > 0 ? indexAt(contentX + (width / 2), contentY + height - 1) : -1
|
readonly property int largestVisibleIndex: count > 0 ? indexAt(contentX + (width / 2), contentY + height - 1) : -1
|
||||||
readonly property bool noNeedMoreContent: !currentRoom || currentRoom.eventsHistoryJob || currentRoom.allHistoryLoaded
|
|
||||||
readonly property bool isLoaded: page.width * page.height > 10
|
readonly property bool isLoaded: page.width * page.height > 10
|
||||||
|
|
||||||
spacing: Kirigami.Units.smallSpacing
|
spacing: Kirigami.Units.smallSpacing
|
||||||
|
|||||||
@@ -380,7 +380,9 @@ bool MessageEventModel::canFetchMore(const QModelIndex &parent) const
|
|||||||
void MessageEventModel::fetchMore(const QModelIndex &parent)
|
void MessageEventModel::fetchMore(const QModelIndex &parent)
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent);
|
Q_UNUSED(parent);
|
||||||
m_currentRoom->getPreviousContent(20);
|
if (m_currentRoom) {
|
||||||
|
m_currentRoom->getPreviousContent(20);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user