TF-3515 Add save email as template feature
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/error/error_type.dart';
|
||||
import 'package:tmail_ui_user/features/composer/domain/exceptions/set_method_exception.dart';
|
||||
|
||||
extension SetMethodExceptionDescriptionExtension on SetMethodException {
|
||||
String? getDescriptionFromErrorType(ErrorType errorType) {
|
||||
return mapErrors.values
|
||||
.firstWhereOrNull((setError) => setError.type == errorType)
|
||||
?.description;
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ abstract class ComposerRepository {
|
||||
{
|
||||
bool withIdentityHeader = false,
|
||||
bool isDraft = false,
|
||||
bool isTemplate = false,
|
||||
});
|
||||
|
||||
Future<UploadAttachment> uploadAttachment(FileInfo fileInfo, Uri uploadUri, {CancelToken? cancelToken});
|
||||
|
||||
@@ -42,6 +42,7 @@ class SaveComposerCacheOnWebInteractor {
|
||||
draftHash: createEmailRequest.savedDraftHash,
|
||||
actionType: createEmailRequest.savedActionType,
|
||||
draftEmailId: createEmailRequest.draftsEmailId,
|
||||
templateEmailId: createEmailRequest.templateEmailId,
|
||||
));
|
||||
return Right(SaveComposerCacheSuccess());
|
||||
} catch (exception) {
|
||||
|
||||
Reference in New Issue
Block a user