mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
- Fix crashs on reply shortcut, delete chat room with presence status, removing participants from group chat.
- Display contact search on forward popup. - If not set by user, use a VFS folder to download files instead of default DownloadDir
This commit is contained in:
parent
9fb849907f
commit
8dec72ffd4
8 changed files with 18 additions and 8 deletions
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include "utils/Utils.hpp"
|
||||
#include "utils/Constants.hpp"
|
||||
#include "components/settings/SettingsModel.hpp"
|
||||
|
||||
#include "Paths.hpp"
|
||||
|
||||
|
|
@ -248,7 +249,10 @@ string Paths::getFriendsListFilePath () {
|
|||
}
|
||||
|
||||
string Paths::getDownloadDirPath () {
|
||||
return getWritableDirPath(QStandardPaths::writableLocation(QStandardPaths::DownloadLocation) + QDir::separator());
|
||||
if( SettingsModel:: getVfsEncrypted())
|
||||
return getWritableDirPath(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation)+ Constants::PathVfs);
|
||||
else
|
||||
return getWritableDirPath(QStandardPaths::writableLocation(QStandardPaths::DownloadLocation) + QDir::separator());
|
||||
}
|
||||
|
||||
std::string Paths::getLimeDatabasePath (){
|
||||
|
|
|
|||
|
|
@ -836,7 +836,7 @@ void ChatRoomModel::updateNewMessageNotice(const int& count){
|
|||
int ChatRoomModel::loadTillMessage(ChatMessageModel * message){
|
||||
if( message){
|
||||
auto linphoneMessage = message->getChatMessage();
|
||||
return loadTillMessage(message);
|
||||
return loadTillMessage(linphoneMessage);
|
||||
}else
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -1140,7 +1140,7 @@ void ChatRoomModel::handleCallCreated(const shared_ptr<linphone::Call> &call){
|
|||
}
|
||||
|
||||
void ChatRoomModel::handlePresenceStatusReceived(std::shared_ptr<linphone::Friend> contact){
|
||||
if(!mDeleteChatRoom && contact){
|
||||
if(!mDeleteChatRoom && contact && mChatRoom){
|
||||
bool canUpdatePresence = false;
|
||||
auto contactAddresses = contact->getAddresses();
|
||||
for( auto itContactAddress = contactAddresses.begin() ; !canUpdatePresence && itContactAddress != contactAddresses.end() ; ++itContactAddress){
|
||||
|
|
|
|||
|
|
@ -97,7 +97,8 @@ QString ParticipantListModel::addressesToString()const{
|
|||
txt << Utils::toDisplayString(Utils::coreStringToAppString(address->asStringUriOnly()), CoreManager::getInstance()->getSettingsModel()->getSipDisplayMode());
|
||||
}
|
||||
}
|
||||
txt.removeFirst();// Remove me
|
||||
if( txt.size() > 0)
|
||||
txt.removeFirst();// Remove me
|
||||
return txt.join(", ");
|
||||
}
|
||||
|
||||
|
|
@ -111,7 +112,8 @@ QString ParticipantListModel::displayNamesToString()const{
|
|||
txt << displayName;
|
||||
}
|
||||
}
|
||||
txt.removeFirst();// Remove me
|
||||
if(txt.size() > 0)
|
||||
txt.removeFirst();// Remove me
|
||||
return txt.join(", ");
|
||||
}
|
||||
|
||||
|
|
@ -124,7 +126,8 @@ QString ParticipantListModel::usernamesToString()const{
|
|||
username = participant->getAddress()->getUsername();
|
||||
txt << Utils::coreStringToAppString(username);
|
||||
}
|
||||
txt.removeFirst();// Remove me
|
||||
if(txt.size() > 0)
|
||||
txt.removeFirst();// Remove me
|
||||
return txt.join(", ");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2005,6 +2005,8 @@ void SettingsModel::setVfsEncrypted (bool encrypted, const bool deleteUserData){
|
|||
if(getVfsEncrypted() != encrypted){
|
||||
if(encrypted) {
|
||||
mVfsUtils.newEncryptionKeyAsync();
|
||||
shared_ptr<linphone::Factory> factory = linphone::Factory::get();
|
||||
factory->setDownloadDir(Utils::appStringToCoreString(getDownloadFolder()));
|
||||
}else{// Remove key, stop core, delete data and initiate reboot
|
||||
mVfsUtils.needToDeleteUserData(deleteUserData);
|
||||
mVfsUtils.deleteKey(mVfsUtils.getApplicationVfsEncryptionKey());
|
||||
|
|
|
|||
|
|
@ -683,7 +683,7 @@ public:
|
|||
QString getLogsEmail () const;
|
||||
void setLogsEmail (const QString &email);
|
||||
|
||||
bool getVfsEncrypted ();
|
||||
static bool getVfsEncrypted ();
|
||||
Q_INVOKABLE void setVfsEncrypted (bool encrypted, const bool deleteUserData);
|
||||
|
||||
Q_INVOKABLE bool isLdapAvailable();
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ constexpr char Constants::PathRootCa[];
|
|||
constexpr char Constants::PathFriendsList[];
|
||||
constexpr char Constants::PathLimeDatabase[];
|
||||
constexpr char Constants::PathMessageHistoryList[];
|
||||
constexpr char Constants::PathVfs[];
|
||||
constexpr char Constants::PathZrtpSecrets[];
|
||||
constexpr char Constants::PathISpellDicts[];
|
||||
constexpr char Constants::PathISpellOwnDict[];
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ public:
|
|||
static constexpr char PathData[] = "/" EXECUTABLE_NAME;
|
||||
static constexpr char PathTools[] = "/tools/";
|
||||
static constexpr char PathLogs[] = "/logs/";
|
||||
static constexpr char PathVfs[] = "/vfs/";
|
||||
#ifdef APPLE
|
||||
static constexpr char PathPlugins[] = "/Plugins/";
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ DialogPlus {
|
|||
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: SipAddressDialogStyle.spacing
|
||||
visible: !timeline.isFilterVisible
|
||||
|
||||
showHeader:false
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue