Hot fix after some reload minimized composer should be lost body

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2025-03-31 10:01:25 +07:00
committed by Dat H. Pham
parent 89a3743eaf
commit 4e0e92c35b
34 changed files with 1144 additions and 1902 deletions
@@ -1,11 +1,19 @@
import 'package:equatable/equatable.dart';
import 'package:jmap_dart_client/http/converter/email_id_nullable_converter.dart';
import 'package:jmap_dart_client/jmap/mail/email/email.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:model/email/email_action_type.dart';
import 'package:tmail_ui_user/features/composer/presentation/model/screen_display_mode.dart';
part 'composer_cache.g.dart';
@JsonSerializable(explicitToJson: true, includeIfNull: false)
@JsonSerializable(
explicitToJson: true,
includeIfNull: false,
converters: [
EmailIdNullableConverter(),
]
)
class ComposerCache with EquatableMixin {
final Email? email;
@@ -14,6 +22,9 @@ class ComposerCache with EquatableMixin {
final ScreenDisplayMode displayMode;
final int? composerIndex;
final String? composerId;
final int? draftHash;
final EmailActionType? actionType;
final EmailId? draftEmailId;
ComposerCache({
this.email,
@@ -22,6 +33,9 @@ class ComposerCache with EquatableMixin {
this.displayMode = ScreenDisplayMode.normal,
this.composerIndex,
this.composerId,
this.draftHash,
this.actionType,
this.draftEmailId,
});
factory ComposerCache.fromJson(Map<String, dynamic> json) => _$ComposerCacheFromJson(json);
@@ -36,5 +50,8 @@ class ComposerCache with EquatableMixin {
displayMode,
composerIndex,
composerId,
draftHash,
actionType,
draftEmailId,
];
}