TF-2177 Update account cache when store new account

Signed-off-by: dab246 <tdvu@linagora.com>
(cherry picked from commit 3fff318bbe66a5f4387c25d18e0d2a9480719d72)
This commit is contained in:
dab246
2023-10-24 14:08:54 +07:00
committed by Dat H. Pham
parent 6a0b3a7bc4
commit fc4a4792c3
4 changed files with 109 additions and 6 deletions
@@ -26,4 +26,26 @@ extension AccountCacheExtension on AccountCache {
apiUrl: apiUrl,
userName: userName != null ? UserName(userName!) : null);
}
AccountCache unselected() {
return AccountCache(
id,
authenticationType,
isSelected: false,
accountId: accountId,
apiUrl: apiUrl,
userName: userName
);
}
AccountCache emptyId() {
return AccountCache(
'',
authenticationType,
isSelected: false,
accountId: accountId,
apiUrl: apiUrl,
userName: userName
);
}
}