mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-27 00:48:08 +00:00
Merge branch 'fix/6.1' into 'release/6.1'
Fixes See merge request BC/public/linphone-desktop!1644
This commit is contained in:
commit
d7c14e0496
6 changed files with 29 additions and 20 deletions
|
|
@ -70,7 +70,7 @@ void CallHistoryList::setSelf(QSharedPointer<CallHistoryList> me) {
|
|||
for (auto it : linphoneCallLogs) {
|
||||
auto model = createCallHistoryCore(it);
|
||||
toConnect(model.get());
|
||||
callLogs->push_back(model);
|
||||
callLogs->push_front(model);
|
||||
}
|
||||
mModelConnection->invokeToCore([this, callLogs]() {
|
||||
mustBeInMainThread(getClassName());
|
||||
|
|
|
|||
|
|
@ -68,8 +68,5 @@ bool CallHistoryProxy::SortFilterList::filterAcceptsRow(int sourceRow, const QMo
|
|||
}
|
||||
|
||||
bool CallHistoryProxy::SortFilterList::lessThan(const QModelIndex &sourceLeft, const QModelIndex &sourceRight) const {
|
||||
auto l = getItemAtSource<CallHistoryList, CallHistoryCore>(sourceLeft.row());
|
||||
auto r = getItemAtSource<CallHistoryList, CallHistoryCore>(sourceRight.row());
|
||||
if (l && r) return l->mDate < r->mDate;
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ ListView {
|
|||
|
||||
onResultsReceived: {
|
||||
loading = false
|
||||
// contentY = 0
|
||||
}
|
||||
|
||||
model: CallHistoryProxy {
|
||||
|
|
@ -49,13 +48,12 @@ ListView {
|
|||
|
||||
Component.onCompleted: cacheBuffer = Math.max(mainItem.height,0) //contentHeight>0 ? contentHeight : 0// cache all items
|
||||
// remove binding loop
|
||||
onContentHeightChanged: Qt.callLater(function () {
|
||||
if (mainItem)
|
||||
mainItem.cacheBuffer = Math?.max(contentHeight, 0) || 0
|
||||
})
|
||||
// onContentHeightChanged: Qt.callLater(function () {
|
||||
// if (mainItem)
|
||||
// mainItem.cacheBuffer = Math?.max(contentHeight, 0) || 0
|
||||
// })
|
||||
|
||||
onActiveFocusChanged: if (activeFocus && currentIndex < 0 && count > 0)
|
||||
currentIndex = 0
|
||||
onActiveFocusChanged: if (activeFocus && currentIndex < 0 && count > 0) currentIndex = 0
|
||||
onCountChanged: {
|
||||
if (currentIndex < 0 && count > 0) {
|
||||
mainItem.currentIndex = 0 // Select first item after loading model
|
||||
|
|
@ -86,8 +84,8 @@ ListView {
|
|||
// Update position only if we are moving to current item and its position is changing.
|
||||
property var _currentItemY: currentItem?.y
|
||||
on_CurrentItemYChanged: if (_currentItemY && moveAnimation.running) {
|
||||
moveToCurrentItem()
|
||||
}
|
||||
moveToCurrentItem()
|
||||
}
|
||||
Behavior on contentY {
|
||||
NumberAnimation {
|
||||
id: moveAnimation
|
||||
|
|
@ -98,10 +96,6 @@ ListView {
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------
|
||||
onVisibleChanged: {
|
||||
// if (!visible)
|
||||
// currentIndex = -1
|
||||
}
|
||||
|
||||
BusyIndicator {
|
||||
anchors.horizontalCenter: mainItem.horizontalCenter
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@ AnimatedImage {
|
|||
autoTransform: true
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: contentGui && UtilsCpp.isAnimatedImage(contentGui.core.filePath) ? ('file:/'+ contentGui.core.filePath) : ""
|
||||
|
||||
// sourceSize.width: implicitWidth
|
||||
// sourceSize.height: implicitHeight
|
||||
states: State {
|
||||
name: 'hovered'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ Control.Control {
|
|||
property var msgState: chatMessage ? chatMessage.core.messageState : LinphoneEnums.ChatMessageState.StateIdle
|
||||
hoverEnabled: true
|
||||
property bool linkHovered: false
|
||||
property real maxWidth: parent?.width || Utils.getSizeWithScreenRatio(300)
|
||||
property real maxWidth: parent ? parent.width : Utils.getSizeWithScreenRatio(300)
|
||||
|
||||
leftPadding: isRemoteMessage ? Utils.getSizeWithScreenRatio(5) : 0
|
||||
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ ColumnLayout {
|
|||
// SINGLE FILE
|
||||
ImageFileView {
|
||||
id: singleImageFile
|
||||
cache: false
|
||||
visible: mainItem.filescontentProxy.count === 1 && source !== "" && UtilsCpp.isImage(contentGui.core.filePath)
|
||||
contentGui: mainItem.filescontentProxy.count === 1
|
||||
? mainItem.filescontentProxy.getChatMessageContentAtIndex(0)
|
||||
|
|
@ -99,6 +100,22 @@ ColumnLayout {
|
|||
Layout.preferredHeight: paintedHeight
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
fillMode: Image.PreserveAspectFit
|
||||
cache: false
|
||||
property int initialSourceWidth
|
||||
property int initialSourceHeight
|
||||
property bool initialization: true
|
||||
onStatusChanged: {
|
||||
if (status == Image.Ready) {
|
||||
if (singleAnimatedImageFile.initialization) {
|
||||
initialSourceWidth = sourceSize.width
|
||||
initialSourceHeight = sourceSize.height
|
||||
singleAnimatedImageFile.initialization = false
|
||||
}
|
||||
var sourceW = Math.min(initialSourceWidth, mainItem.maxWidth)
|
||||
sourceSize.height = Math.round((sourceW/initialSourceWidth) * initialSourceHeight)
|
||||
sourceSize.width = sourceW
|
||||
}
|
||||
}
|
||||
}
|
||||
VideoFileView {
|
||||
id: singleVideoFile
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue