Optimize and refactor for MailboxVisibility

This commit is contained in:
dab246
2023-02-17 11:21:54 +07:00
committed by Dat Vu
parent 1f871ac8eb
commit f2a63c083a
17 changed files with 343 additions and 487 deletions
+2 -4
View File
@@ -103,10 +103,8 @@ class PresentationMailbox with EquatableMixin {
(namespace?.value.indexOf('[') ?? 0) + 1,
namespace?.value.indexOf(']'));
bool get supportedSubscribe => isSubscribed?.value == true;
bool get isSupportedDisableMailbox {
if (!supportedSubscribe) {
if (!isSubscribedMailbox) {
return false;
}
if (isPersonal) {
@@ -117,7 +115,7 @@ class PresentationMailbox with EquatableMixin {
}
bool get isSupportedEnableMailbox {
if (supportedSubscribe) {
if (isSubscribedMailbox) {
return false;
}
if (isPersonal) {