TF-1310: [Presentation] Refactor buildTree logic in TreeBuilder + BaseMailboxController
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import 'package:jmap_dart_client/jmap/core/id.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/unsigned_int.dart';
|
||||
import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart';
|
||||
import 'package:jmap_dart_client/jmap/mail/mailbox/namespace.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox/data/model/mailbox_cache.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox/data/extensions/mailbox_rights_cache_extension.dart';
|
||||
|
||||
@@ -18,7 +19,8 @@ extension MailboxCacheExtension on MailboxCache {
|
||||
totalThreads: totalThreads != null ? TotalThreads(UnsignedInt(totalThreads!)) : null,
|
||||
unreadThreads: unreadThreads != null ? UnreadThreads(UnsignedInt(unreadThreads!)) : null,
|
||||
myRights: myRights != null ? myRights!.toMailboxRights() : null,
|
||||
isSubscribed: isSubscribed != null ? IsSubscribed(isSubscribed!) : null
|
||||
isSubscribed: isSubscribed != null ? IsSubscribed(isSubscribed!) : null,
|
||||
namespace: namespace != null ? Namespace(namespace!) : null
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,8 @@ extension MailboxExtension on Mailbox {
|
||||
totalThreads: totalThreads?.value.value.round(),
|
||||
unreadThreads: unreadThreads?.value.value.round(),
|
||||
myRights: myRights != null ? myRights!.toMailboxRightsCache() : null,
|
||||
isSubscribed: isSubscribed?.value
|
||||
isSubscribed: isSubscribed?.value,
|
||||
namespace: namespace?.value
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user