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,8 +380,10 @@ 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);
|
||||||
|
if (m_currentRoom) {
|
||||||
m_currentRoom->getPreviousContent(20);
|
m_currentRoom->getPreviousContent(20);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
inline QVariantMap userAtEvent(NeoChatUser *user, NeoChatRoom *room, const RoomEvent &evt)
|
inline QVariantMap userAtEvent(NeoChatUser *user, NeoChatRoom *room, const RoomEvent &evt)
|
||||||
|
|||||||
Reference in New Issue
Block a user