From 1151fc7563d39a844728e1e613b83dce2fd17b78 Mon Sep 17 00:00:00 2001 From: Justin Mazzocchi <2831158+jzzocc@users.noreply.github.com> Date: Thu, 28 Jan 2021 11:16:23 -0800 Subject: [PATCH] Add id check --- ViewModels/Sources/ViewModels/View Models/RootViewModel.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ViewModels/Sources/ViewModels/View Models/RootViewModel.swift b/ViewModels/Sources/ViewModels/View Models/RootViewModel.swift index 4b2d9f9..d7c7a65 100644 --- a/ViewModels/Sources/ViewModels/View Models/RootViewModel.swift +++ b/ViewModels/Sources/ViewModels/View Models/RootViewModel.swift @@ -88,7 +88,9 @@ private extension RootViewModel { let identityPublisher = identityService.identityPublisher(immediate: immediate) .catch { [weak self] _ -> Empty in DispatchQueue.main.async { - self?.identitySelected(id: self?.mostRecentlyUsedIdentityId, immediate: false) + if self?.navigationViewModel?.identityContext.identity.id == id { + self?.identitySelected(id: self?.mostRecentlyUsedIdentityId, immediate: false) + } } return Empty()