public static ISettingsService ResolveSettingsService(IUnityContainer container) { var settingsService = new SettingsService(); int settingsVersion = settingsService.Get(AppConstants.SETTINGS_VERSION_PARAMETER, 0); if (settingsVersion < AppConstants.SETTINGS_VERSION) { settingsService.Clear(); settingsService.Set(AppConstants.SETTINGS_VERSION_PARAMETER, AppConstants.SETTINGS_VERSION); } if (settingsService.ContainsSetting(AppConstants.DEPRECATED_PUSH_NOTIFICATIONS_PARAMETER)) { bool isEnabled = settingsService.Get(AppConstants.DEPRECATED_PUSH_NOTIFICATIONS_PARAMETER, true); settingsService.Remove(AppConstants.DEPRECATED_PUSH_NOTIFICATIONS_PARAMETER); settingsService.Set(AppConstants.PUSH_NOTIFICATIONS_PARAMETER, isEnabled); } return(settingsService); }
//public ICommand MenuNavigateCommand { get; } #endregion #region Methods private async Task LogoutUser() { try { if (await DialogsService?.ConfirmAsync(this["Msg_Confirm_Disconnect"], this["Msg_Confirm_Title"], this["Msg_Confirm_Ok"], this["Msg_Confirm_Cancel"])) { DialogsService?.Loading(this["Msg_Loading_Disconnecting"]); await Task.Delay(500); //await DataService.ClearUserDataAsync(); SettingsService?.Clear(); //_notificationService.Unregister(); Logger.Write("LogoutUser", $"Day({DateTime.Now.ToString("yyyy_MM_dd")})"); await NavigationService.NavigateAsync($"{nameof(App)}:///{nameof(StartupPage)}"); } } catch (Exception ex) { Logger.Write(ex); } }