diff --git a/Classes/LinphoneCoreSettingsStore.m b/Classes/LinphoneCoreSettingsStore.m index f776bc624..2c27099d0 100644 --- a/Classes/LinphoneCoreSettingsStore.m +++ b/Classes/LinphoneCoreSettingsStore.m @@ -183,6 +183,7 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args); [self setString: lp_config_get_string(linphone_core_get_config(lc),"app","rotation_preference", "auto") forKey:@"rotation_preference"]; [self setBool: lp_config_get_int(linphone_core_get_config(lc),"app","enable_first_login_view_preference", 0) forKey:@"enable_first_login_view_preference"]; [self setBool: lp_config_get_int(linphone_core_get_config(lc),"app","debugenable_preference", 0) forKey:@"debugenable_preference"]; + [self setBool: lp_config_get_int(linphone_core_get_config(lc),"app","animations_preference", 1) forKey:@"animations_preference"]; [self setBool: lp_config_get_int(linphone_core_get_config(lc),"app","check_config_disable_preference", 0) forKey:@"check_config_disable_preference"]; [self setBool: lp_config_get_int(linphone_core_get_config(lc),"app","wifi_only_preference", 0) forKey:@"wifi_only_preference"]; @@ -486,6 +487,9 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args); lp_config_set_int(linphone_core_get_config(lc),"app","debugenable_preference", debugmode); if (debugmode) linphone_core_enable_logs_with_cb((OrtpLogFunc)linphone_iphone_log_handler); else linphone_core_disable_logs(); + + BOOL animations = [self boolForKey:@"animations_preference"]; + lp_config_set_int(linphone_core_get_config(lc),"app","animations_preference", animations); /*keep this one also in the standardUserDefaults so that it can be read before starting liblinphone*/ BOOL start_at_boot = [self boolForKey:@"start_at_boot_preference"]; diff --git a/Classes/LinphoneUI/UICallBar.m b/Classes/LinphoneUI/UICallBar.m index ff13ea619..968a0bc3c 100644 --- a/Classes/LinphoneUI/UICallBar.m +++ b/Classes/LinphoneUI/UICallBar.m @@ -371,9 +371,9 @@ - (IBAction)onPadClick:(id)sender { if([padView isHidden]) { - [self showPad:TRUE]; + [self showPad:[[LinphoneManager instance].settingsStore boolForKey:@"animations_preference"]]; } else { - [self hidePad:TRUE]; + [self hidePad:[[LinphoneManager instance].settingsStore boolForKey:@"animations_preference"]]; } } @@ -399,9 +399,9 @@ - (IBAction)onOptionsClick:(id)sender { if([optionsView isHidden]) { - [self showOptions:TRUE]; + [self showOptions:[[LinphoneManager instance].settingsStore boolForKey:@"animations_preference"]]; } else { - [self hideOptions:TRUE]; + [self hideOptions:[[LinphoneManager instance].settingsStore boolForKey:@"animations_preference"]]; } } diff --git a/Classes/PhoneMainView.m b/Classes/PhoneMainView.m index af4824271..b8aa97e46 100644 --- a/Classes/PhoneMainView.m +++ b/Classes/PhoneMainView.m @@ -484,7 +484,11 @@ static PhoneMainView* phoneMainViewInstance=nil; if(force || ![view equal: currentView]) { if(transition == nil) transition = [PhoneMainView getTransition:currentView new:view]; - [mainViewController setViewTransition:transition]; + if ([[LinphoneManager instance].settingsStore boolForKey:@"animations_preference"] == true) { + [mainViewController setViewTransition:transition]; + } else { + [mainViewController setViewTransition:nil]; + } [mainViewController changeView:view]; currentView = view; } diff --git a/Classes/WizardViewController.m b/Classes/WizardViewController.m index 04711c118..e2607d7a6 100644 --- a/Classes/WizardViewController.m +++ b/Classes/WizardViewController.m @@ -226,7 +226,7 @@ static UICompositeViewDescription *compositeDescription = nil; } // Animation - if(animation) { + if(animation && [[LinphoneManager instance].settingsStore boolForKey:@"animations_preference"] == true) { CATransition* trans = [CATransition animation]; [trans setType:kCATransitionPush]; [trans setDuration:0.35]; diff --git a/Settings/InAppSettings.bundle/Advanced.plist b/Settings/InAppSettings.bundle/Advanced.plist index 4218c07f4..675b6f29c 100644 --- a/Settings/InAppSettings.bundle/Advanced.plist +++ b/Settings/InAppSettings.bundle/Advanced.plist @@ -14,6 +14,16 @@ Type PSToggleSwitchSpecifier + + DefaultValue + + Key + animations_preference + Title + Animations + Type + PSToggleSwitchSpecifier + DefaultValue auto