TF-4233 Implement edit label action

This commit is contained in:
dab246
2026-01-05 16:36:06 +07:00
committed by Dat H. Pham
parent 0302e09981
commit bac101021e
17 changed files with 376 additions and 66 deletions
@@ -2,6 +2,7 @@ import 'package:jmap_dart_client/jmap/account_id.dart';
import 'package:labels/model/label.dart';
import 'package:tmail_ui_user/features/labels/data/datasource/label_datasource.dart';
import 'package:tmail_ui_user/features/labels/data/network/label_api.dart';
import 'package:tmail_ui_user/features/labels/domain/model/edit_label_request.dart';
import 'package:tmail_ui_user/main/exceptions/exception_thrower.dart';
class LabelDatasourceImpl extends LabelDatasource {
@@ -23,4 +24,11 @@ class LabelDatasourceImpl extends LabelDatasource {
return await _labelApi.createNewLabel(accountId, labelData);
}).catchError(_exceptionThrower.throwException);
}
@override
Future<Label> editLabel(AccountId accountId, EditLabelRequest labelRequest) {
return Future.sync(() async {
return await _labelApi.editLabel(accountId, labelRequest);
}).catchError(_exceptionThrower.throwException);
}
}