diff --git a/src/App/Pages/Accounts/LoginPage.xaml.cs b/src/App/Pages/Accounts/LoginPage.xaml.cs index bde7ba0f7..e6acef02e 100644 --- a/src/App/Pages/Accounts/LoginPage.xaml.cs +++ b/src/App/Pages/Accounts/LoginPage.xaml.cs @@ -147,8 +147,10 @@ namespace Bit.App.Pages return; } - var selection = await DisplayActionSheet(AppResources.Options, - AppResources.Cancel, null, AppResources.GetPasswordHint, AppResources.RemoveAccount); + var buttons = _email.IsEnabled ? new[] { AppResources.GetPasswordHint } + : new[] { AppResources.GetPasswordHint, AppResources.RemoveAccount }; + var selection = await DisplayActionSheet(AppResources.Options, + AppResources.Cancel, null, buttons); if (selection == AppResources.GetPasswordHint) { diff --git a/src/Core/Services/StateMigrationService.cs b/src/Core/Services/StateMigrationService.cs index ce3c7cf92..91f74912c 100644 --- a/src/Core/Services/StateMigrationService.cs +++ b/src/Core/Services/StateMigrationService.cs @@ -326,19 +326,19 @@ namespace Bit.Core.Services return lastVersion.Value; } - // check for original v1 migration - var envUrlsLiteDb = await GetValueAsync(Storage.LiteDb, V1Keys.EnvironmentUrlsKey); - if (envUrlsLiteDb != null) + // check for v1 state + var v1EnvUrls = await GetValueAsync(Storage.LiteDb, V1Keys.EnvironmentUrlsKey); + if (v1EnvUrls != null) { // environmentUrls still in LiteDB (never migrated to prefs), this is v1 return 1; } - // check for original v2 migration - var envUrlsPrefs = await GetValueAsync(Storage.Prefs, V2Keys.EnvironmentUrlsKey); - if (envUrlsPrefs != null) + // check for v2 state + var v2UserId = await GetValueAsync(Storage.LiteDb, V2Keys.Keys_UserId); + if (v2UserId != null) { - // environmentUrls in Prefs (migrated from LiteDB), this is v2 + // standalone userId still exists (never moved to Account object), this is v2 return 2; } diff --git a/src/Core/Services/StateService.cs b/src/Core/Services/StateService.cs index b980e7e0b..8c7162191 100644 --- a/src/Core/Services/StateService.cs +++ b/src/Core/Services/StateService.cs @@ -1377,6 +1377,7 @@ namespace Bit.Core.Services { await CheckStateAsync(); var currentTheme = await GetThemeAsync(); + var currentDisableFavicons = await GetDisableFaviconAsync(); account.Settings.EnvironmentUrls = await GetPreAuthEnvironmentUrlsAsync(); @@ -1405,6 +1406,7 @@ namespace Bit.Core.Services account.Settings.VaultTimeoutAction = VaultTimeoutAction.Lock; } await SetThemeAsync(currentTheme, account.Profile.UserId); + await SetDisableFaviconAsync(currentDisableFavicons, account.Profile.UserId); state.Accounts[account.Profile.UserId] = account; await SaveStateToStorageAsync(state);