From 942db35732ca0b86cce85ac2f04217b0d5cb9aa3 Mon Sep 17 00:00:00 2001 From: Christophe Deschamps Date: Fri, 18 Jun 2021 15:34:26 +0200 Subject: [PATCH] Prevent VFS from re-generating a key when navigating to chat settings with VFS enabled --- Classes/LinphoneCoreSettingsStore.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/LinphoneCoreSettingsStore.m b/Classes/LinphoneCoreSettingsStore.m index dce78f3b2..7a6193432 100644 --- a/Classes/LinphoneCoreSettingsStore.m +++ b/Classes/LinphoneCoreSettingsStore.m @@ -791,8 +791,8 @@ } linphone_core_set_max_size_for_auto_download_incoming_files(LC, maxSize); [lm lpConfigSetString:[self stringForKey:@"auto_download_mode"] forKey:@"auto_download_mode"]; - BOOL vfsEnabled = [self boolForKey:@"vfs_enabled_mode"] || [VFSUtil vfsEnabledWithGroupName:kLinphoneMsgNotificationAppGroupId]; - if (vfsEnabled) { + BOOL vfsPrefEnabled = [self boolForKey:@"vfs_enabled_mode"] || [VFSUtil vfsEnabledWithGroupName:kLinphoneMsgNotificationAppGroupId]; + if (vfsPrefEnabled && ![VFSUtil vfsEnabledWithGroupName:kLinphoneMsgNotificationAppGroupId]) { if (TARGET_IPHONE_SIMULATOR) { LOGW(@"[VFS] Can not active for simulators."); [VFSUtil setVfsEnabbledWithEnabled:false groupName:kLinphoneMsgNotificationAppGroupId];