Skip to content

Commit 8c1b3c4

Browse files
committed
Ensure proper disposal of accounts
1 parent cb3a174 commit 8c1b3c4

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

src/Sdk/SecureFolderFS.Sdk/ViewModels/Views/Wizard/DataSources/AccountSourceWizardViewModel.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ private async Task SelectAccountAsync(AccountViewModel? accountViewModel, Cancel
188188
public override void Dispose()
189189
{
190190
NavigationRequested = null;
191+
Accounts.Select(x => x != SelectedAccount).DisposeAll();
192+
Accounts.Clear();
191193
}
192194
}
193195
}

src/Sdk/SecureFolderFS.Sdk/ViewModels/Views/Wizard/SourceSelectionWizardViewModel.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ public Task<IResult> TryCancelAsync(CancellationToken cancellationToken)
5858
/// <inheritdoc/>
5959
public override async void OnAppearing()
6060
{
61-
if (!Sources.IsEmpty())
62-
return;
63-
6461
var sources = await VaultFileSystemService.GetSourcesAsync(_vaultCollectionModel, _mode).ToArrayAsyncImpl();
6562
Sources.DisposeAll();
6663
Sources.Clear();

0 commit comments

Comments
 (0)