Browse Source

PS-291 Fix password history to update the collection on the main thread to load correctly (#1890)

github-services/pull/1738/head
Federico Maccaroni 4 years ago committed by GitHub
parent
commit
57213607a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/App/Pages/Generator/GeneratorHistoryPageViewModel.cs

7
src/App/Pages/Generator/GeneratorHistoryPageViewModel.cs

@ -41,8 +41,11 @@ namespace Bit.App.Pages @@ -41,8 +41,11 @@ namespace Bit.App.Pages
public async Task InitAsync()
{
var history = await _passwordGenerationService.GetHistoryAsync();
History.ResetWithRange(history ?? new List<GeneratedPasswordHistory>());
ShowNoData = History.Count == 0;
Device.BeginInvokeOnMainThread(() =>
{
History.ResetWithRange(history ?? new List<GeneratedPasswordHistory>());
ShowNoData = History.Count == 0;
});
}
public async Task ClearAsync()

Loading…
Cancel
Save