diff --git a/CHANGELOG.md b/CHANGELOG.md index c3d4d1b2c..e67504544 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,7 +36,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Display video thumbnails. - Crop thumbnail and pictures if distored. - Enable registration from accounts list. -- Update SDK to 5.2.88 +- Update SDK to 5.2.89 ### Removed - Picture zoom on mouse over. diff --git a/linphone-app/ui/modules/Linphone/Chat/Chat.qml b/linphone-app/ui/modules/Linphone/Chat/Chat.qml index 4162ff846..df0d21880 100644 --- a/linphone-app/ui/modules/Linphone/Chat/Chat.qml +++ b/linphone-app/ui/modules/Linphone/Chat/Chat.qml @@ -67,7 +67,8 @@ Rectangle { // Load optimizations property int remainingLoadersCount: 0 - property int syncLoaderBatch: 20 // batch of simultaneous loaders on synchronous mode + property int visibleItemsEstimation: chat.height / (2 * textMetrics.height) // Title + body + property int syncLoaderBatch: visibleItemsEstimation // batch of simultaneous loaders on synchronous mode //------------------------------------ signal refreshContents() @@ -93,6 +94,11 @@ Rectangle { running: false onTriggered: chat.refreshContents() } + TextMetrics{ + id: textMetrics + font: SettingsModel.textMessageFont + text: "X" + } Layout.fillHeight: true Layout.fillWidth: true @@ -110,6 +116,9 @@ Rectangle { Component.onCompleted: { Logic.initView() refreshContentsTimer.start() + console.debug("Chat loading with "+chat.visibleItemsEstimation+" visible items. "+chat.count) + if(chat.visibleItemsEstimation >= chat.count) + Qt.callLater(container.proxyModel.loadMoreEntriesAsync) } onMovementStarted: {Logic.handleMovementStarted(); chat.isMoving = true} onMovementEnded: {Logic.handleMovementEnded(); chat.isMoving = false} @@ -235,7 +244,8 @@ Rectangle { Layout.fillWidth: true source: Logic.getComponentFromEntry(entry.chatEntry) z:1 - asynchronous: index != chat.count - 1 + + asynchronous: index < chat.count - 1 - chat.visibleItemsEstimation property int loaderIndex: 0 function updateSync(){ if( asynchronous && loaderIndex > 0 && chat.remainingLoadersCount - loaderIndex - chat.syncLoaderBatch <= 0 ) asynchronous = false// Sync load the end diff --git a/linphone-sdk b/linphone-sdk index 427cc9848..80e3a7377 160000 --- a/linphone-sdk +++ b/linphone-sdk @@ -1 +1 @@ -Subproject commit 427cc9848f43e5ed88be897341709ebed79bb354 +Subproject commit 80e3a7377b6f42f43f46d706a47cc2dea827682b