mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-06 20:23:08 +00:00
Fix spamming vfs request on store.
This commit is contained in:
parent
56cff70b1b
commit
3e713f0762
2 changed files with 6 additions and 8 deletions
|
|
@ -71,23 +71,23 @@ SettingsModel::SettingsModel (QObject *parent) : QObject(parent) {
|
|||
|
||||
connect(&mVfsUtils, &VfsUtils::keyRead, this, [&](const QString& key, const QString& value){
|
||||
if(key == mVfsUtils.getApplicationVfsEncryptionKey()){
|
||||
if(!mVfsEncrypted){
|
||||
mVfsEncrypted = true;
|
||||
if(!getVfsEncrypted()){
|
||||
mConfig->setBool(UiSection, "vfs_encryption_enabled", true);
|
||||
emit vfsEncryptedChanged();
|
||||
}
|
||||
}
|
||||
});
|
||||
connect(&mVfsUtils, &VfsUtils::keyWritten, this, [&](const QString& key){
|
||||
if(key == mVfsUtils.getApplicationVfsEncryptionKey()){
|
||||
if(!mVfsEncrypted){
|
||||
mVfsEncrypted = true;
|
||||
if(!getVfsEncrypted()){
|
||||
mConfig->setBool(UiSection, "vfs_encryption_enabled", true);
|
||||
emit vfsEncryptedChanged();
|
||||
}
|
||||
}
|
||||
});
|
||||
connect(&mVfsUtils, &VfsUtils::keyDeleted, this, [&](const QString& key){
|
||||
if(key == mVfsUtils.getApplicationVfsEncryptionKey()){
|
||||
mVfsEncrypted = false;
|
||||
mConfig->setBool(UiSection, "vfs_encryption_enabled", false);
|
||||
emit vfsEncryptedChanged();
|
||||
if(mVfsUtils.needToDeleteUserData())
|
||||
Utils::deleteAllUserData();
|
||||
|
|
@ -1731,8 +1731,7 @@ bool SettingsModel::getLogsEnabled (const shared_ptr<linphone::Config> &config)
|
|||
// ---------------------------------------------------------------------------
|
||||
|
||||
bool SettingsModel::getVfsEncrypted (){
|
||||
mVfsUtils.readKey(mVfsUtils.getApplicationVfsEncryptionKey());
|
||||
return mVfsEncrypted;
|
||||
return mConfig->getBool(UiSection, "vfs_encryption_enabled", false);
|
||||
}
|
||||
|
||||
void SettingsModel::setVfsEncrypted (bool encrypted, const bool deleteUserData){
|
||||
|
|
|
|||
|
|
@ -816,7 +816,6 @@ private:
|
|||
MediastreamerUtils::SimpleCaptureGraph *mSimpleCaptureGraph = nullptr;
|
||||
int mCaptureGraphListenerCount = 0;
|
||||
VfsUtils mVfsUtils;
|
||||
bool mVfsEncrypted = false;
|
||||
|
||||
std::shared_ptr<linphone::Config> mConfig;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue