TF-4193 Fix all Nitpick comments from coderabbit

This commit is contained in:
dab246
2025-12-10 12:10:17 +07:00
committed by Dat H. Pham
parent ef2ab39a3a
commit 6b1c7e23dc
33 changed files with 20 additions and 91 deletions
@@ -82,22 +82,16 @@ class ManageAccountDataSourceImpl extends ManageAccountDataSource {
@override
Future<bool> getLabelVisibility() {
return Future.sync(() async {
return await _settingCacheManager.getLabelVisibility();
}).catchError((error, stackTrace) async {
await _exceptionThrower.throwException(error, stackTrace);
throw error;
});
return Future.sync(() {
return _settingCacheManager.getLabelVisibility();
}).catchError(_exceptionThrower.throwException);
}
@override
Future<void> saveLabelVisibility(bool visible) {
return Future.sync(() async {
return await _settingCacheManager.saveLabelVisibility(visible);
}).catchError((error, stackTrace) async {
await _exceptionThrower.throwException(error, stackTrace);
throw error;
});
}).catchError(_exceptionThrower.throwException);
}
@override
@@ -105,9 +99,6 @@ class ManageAccountDataSourceImpl extends ManageAccountDataSource {
return Future.sync(() async {
final labelConfig = await _preferencesSettingManager.getLabelConfig();
return labelConfig.isEnabled;
}).catchError((error, stackTrace) async {
await _exceptionThrower.throwException(error, stackTrace);
throw error;
});
}).catchError(_exceptionThrower.throwException);
}
}