TF-1487 Apply linter rule

This commit is contained in:
dab246
2023-02-24 12:12:54 +07:00
committed by Dat Vu
parent 117a8a8fc6
commit 2b71aba278
155 changed files with 798 additions and 1039 deletions
@@ -25,9 +25,7 @@ class SearchDataSourceImpl extends SearchDataSource {
recentSearch.value,
recentSearch.toRecentSearchCache());
}
}).catchError((error) {
_exceptionThrower.throwException(error);
});
}).catchError(_exceptionThrower.throwException);
}
@override
@@ -47,9 +45,7 @@ class SearchDataSourceImpl extends SearchDataSource {
: listRecentSearch;
return newListRecentSearch;
}).catchError((error) {
_exceptionThrower.throwException(error);
});
}).catchError(_exceptionThrower.throwException);
}
bool _filterRecentSearchCache(RecentSearchCache recentSearchCache, String? pattern) {
@@ -16,27 +16,21 @@ class SharePreferenceSpamReportDataSourceImpl extends SpamReportDataSource {
Future<DateTime> getLastTimeDismissedSpamReported() async {
return Future.sync(() async {
return await _sharePreferenceSpamReportDataSource.getLastTimeDismissedSpamReported();
}).catchError((error) {
_exceptionThrower.throwException(error);
});
}).catchError(_exceptionThrower.throwException);
}
@override
Future<bool> storeLastTimeDismissedSpamReported(DateTime lastTimeDismissedSpamReported) async {
return Future.sync(() async {
return await _sharePreferenceSpamReportDataSource.storeLastTimeDismissedSpamReported(lastTimeDismissedSpamReported);
}).catchError((error) {
_exceptionThrower.throwException(error);
});
}).catchError(_exceptionThrower.throwException);
}
@override
Future<bool> deleteLastTimeDismissedSpamReported() {
return Future.sync(() async {
return await _sharePreferenceSpamReportDataSource.deleteLastTimeDismissedSpamReported();
}).catchError((error) {
_exceptionThrower.throwException(error);
});
}).catchError(_exceptionThrower.throwException);
}
@override
@@ -54,26 +48,20 @@ class SharePreferenceSpamReportDataSourceImpl extends SpamReportDataSource {
Future<void> deleteSpamReportState() {
return Future.sync(() async {
return await _sharePreferenceSpamReportDataSource.deleteLastTimeDismissedSpamReported();
}).catchError((error) {
_exceptionThrower.throwException(error);
});
}).catchError(_exceptionThrower.throwException);
}
@override
Future<SpamReportState> getSpamReportState() {
return Future.sync(() async {
return await _sharePreferenceSpamReportDataSource.getSpamReportState();
}).catchError((error) {
_exceptionThrower.throwException(error);
});
}).catchError(_exceptionThrower.throwException);
}
@override
Future<void> storeSpamReportState(SpamReportState spamReportState) {
return Future.sync(() async {
return await _sharePreferenceSpamReportDataSource.storeSpamReportState(spamReportState);
}).catchError((error) {
_exceptionThrower.throwException(error);
});
}).catchError(_exceptionThrower.throwException);
}
}
@@ -28,12 +28,10 @@ class SpamReportDataSourceImpl extends SpamReportDataSource {
}
) {
return Future.sync(() async {
final _unreadSpamEmailsResponse = await _spamReportApi.getUnreadSpamEmailbox(
final unreadSpamEmailsResponse = await _spamReportApi.getUnreadSpamEmailbox(
accountId, mailboxFilterCondition: mailboxFilterCondition, limit: limit);
return _unreadSpamEmailsResponse;
}).catchError((error) {
_exceptionThrower.throwException(error);
});
return unreadSpamEmailsResponse;
}).catchError(_exceptionThrower.throwException);
}
@override