TF-1310: Check capability of TeamMailboxes in session

This commit is contained in:
HuyNguyen
2023-01-31 22:43:25 +07:00
committed by Dat Vu
parent 33bf4002e8
commit d57bcd10dd
10 changed files with 46 additions and 19 deletions
@@ -35,7 +35,7 @@ class MailboxRepositoryImpl extends MailboxRepository {
);
@override
Stream<MailboxResponse> getAllMailbox(AccountId accountId, {Properties? properties}) async* {
Stream<MailboxResponse> getAllMailbox(Session session, AccountId accountId, {Properties? properties}) async* {
final localMailboxResponse = await Future.wait([
mapDataSource[DataSourceType.local]!.getAllMailboxCache(),
stateDataSource.getState(StateType.mailbox)
@@ -70,7 +70,7 @@ class MailboxRepositoryImpl extends MailboxRepository {
]);
}
} else {
final mailboxResponse = await mapDataSource[DataSourceType.network]!.getAllMailbox(accountId);
final mailboxResponse = await mapDataSource[DataSourceType.network]!.getAllMailbox(session, accountId,);
await Future.wait([
mapDataSource[DataSourceType.local]!.update(created: mailboxResponse.mailboxes),