TF-495 Implement linter for mailbox view
This commit is contained in:
@@ -16,7 +16,7 @@ class StateDataSourceImpl extends StateDataSource {
|
||||
Future<State?> getState(StateType stateType) {
|
||||
return Future.sync(() async {
|
||||
final stateCache = await _stateCacheClient.getItem(stateType.value);
|
||||
return stateCache != null ? stateCache.toState() : null;
|
||||
return stateCache?.toState();
|
||||
}).catchError((error) {
|
||||
throw error;
|
||||
});
|
||||
|
||||
@@ -3,9 +3,6 @@ import 'package:tmail_ui_user/features/mailbox/data/model/mailbox_cache.dart';
|
||||
|
||||
extension ListMailboxCacheExtension on List<MailboxCache> {
|
||||
Map<String, MailboxCache> toMap() {
|
||||
return Map<String, MailboxCache>.fromIterable(
|
||||
this,
|
||||
key: (mailboxCache) => mailboxCache.id,
|
||||
value: (mailboxCache) => mailboxCache);
|
||||
return { for (var mailboxCache in this) mailboxCache.id : mailboxCache };
|
||||
}
|
||||
}
|
||||
@@ -158,14 +158,14 @@ class MailboxAPI {
|
||||
final requestBuilder = JmapRequestBuilder(httpClient, ProcessingInvocation());
|
||||
final currentSetMailboxInvocations = currentExecuteList.map((mailboxId) {
|
||||
return SetMailboxMethod(accountId)
|
||||
..addDestroy(Set.of([mailboxId.id]))
|
||||
..addDestroy({mailboxId.id})
|
||||
..addOnDestroyRemoveEmails(true);
|
||||
})
|
||||
.map(requestBuilder.invocation)
|
||||
.toList();
|
||||
|
||||
final response = await (requestBuilder
|
||||
..usings(Set.of([CapabilityIdentifier.jmapCore, CapabilityIdentifier.jmapMail])))
|
||||
..usings({CapabilityIdentifier.jmapCore, CapabilityIdentifier.jmapMail}))
|
||||
.build()
|
||||
.execute();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user