mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-07 14:44:01 +00:00
Fix attachment order and voice recording path
This commit is contained in:
parent
a84e2b8326
commit
edf43e9f9d
2 changed files with 12 additions and 7 deletions
|
|
@ -244,7 +244,7 @@ string Paths::getFriendsListFilePath () {
|
|||
}
|
||||
|
||||
string Paths::getDownloadDirPath () {
|
||||
return getWritableDirPath(QStandardPaths::writableLocation(QStandardPaths::DownloadLocation));
|
||||
return getWritableDirPath(QStandardPaths::writableLocation(QStandardPaths::DownloadLocation) + QDir::separator());
|
||||
}
|
||||
|
||||
std::string Paths::getLimeDatabasePath (){
|
||||
|
|
|
|||
|
|
@ -57,17 +57,22 @@ bool ContentProxyModel::lessThan (const QModelIndex &left, const QModelIndex &ri
|
|||
const ContentModel *contentB = sourceModel()->data(right).value<ContentModel *>();
|
||||
bool aIsForward = contentA->getChatMessageModel()->isForward();
|
||||
bool aIsReply = contentA->getChatMessageModel()->isReply();
|
||||
bool aIsVoiceRecording = contentA->isVoiceRecording();
|
||||
bool aIsFile = contentA->isFile() || contentA->isFileEncrypted() || contentA->isFileTransfer();
|
||||
bool aIsText = contentA->isText() ;
|
||||
bool bIsForward = contentB->getChatMessageModel()->isForward();
|
||||
bool bIsReply = contentB->getChatMessageModel()->isReply();
|
||||
bool bIsVoiceRecording = contentB->isVoiceRecording();
|
||||
bool bIsFile = contentB->isFile() || contentB->isFileEncrypted() || contentB->isFileTransfer();
|
||||
bool bIsText = contentB->isText() ;
|
||||
|
||||
return aIsForward && !bIsForward
|
||||
|| aIsReply && !bIsForward && !bIsReply
|
||||
|| aIsFile && !bIsForward && !bIsReply && !bIsFile
|
||||
|| aIsText && !bIsForward && !bIsReply && !bIsFile && !bIsText
|
||||
|
||||
;
|
||||
return !bIsForward && (aIsForward
|
||||
|| !bIsReply && (aIsReply
|
||||
|| !bIsVoiceRecording && (aIsVoiceRecording
|
||||
|| !bIsFile && (aIsFile
|
||||
|| aIsText && !bIsText
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue