[KOE-166] Showing checkbox for impersonated stores that are already opened even without an email address, to allow removing it

This commit is contained in:
Patrick Simpson 2018-07-04 13:43:03 +03:00
parent ec92d1ed7e
commit 85753c4a85
1 changed files with 3 additions and 1 deletions

View File

@ -102,7 +102,9 @@ namespace Acacia.Features.SharedFolders
ChildLoader = new UserFolderLoader(this, folders, user);
ChildLoader.ReloadOnCloseOpen = true;
HasCheckBox = folders.SupportsWholeStore && !string.IsNullOrWhiteSpace(user.EmailAddress);
// Can only open the whole store if it's supported and there's an email address, as that's needed to open it
// However, if it's already opened, we can remove it without the email address
HasCheckBox = folders.SupportsWholeStore && (!string.IsNullOrWhiteSpace(user.EmailAddress) || isShared);
ApplyReadOnly(this, IsReadOnly);
// TODO: better icons, better way of handling this