Reload still keep composer open
This commit is contained in:
committed by
Dat H. Pham
parent
76315fada0
commit
63f8b911e0
@@ -12,7 +12,7 @@ import 'package:model/extensions/media_type_nullable_extension.dart';
|
|||||||
|
|
||||||
class ComposerCache with EquatableMixin {
|
class ComposerCache with EquatableMixin {
|
||||||
|
|
||||||
final EmailId id;
|
final EmailId? id;
|
||||||
final Map<MailboxId, bool>? mailboxIds;
|
final Map<MailboxId, bool>? mailboxIds;
|
||||||
final String? subject;
|
final String? subject;
|
||||||
final Set<EmailAddress>? from;
|
final Set<EmailAddress>? from;
|
||||||
@@ -24,24 +24,23 @@ class ComposerCache with EquatableMixin {
|
|||||||
final Set<EmailBodyPart>? htmlBody;
|
final Set<EmailBodyPart>? htmlBody;
|
||||||
final Map<PartId, EmailBodyValue>? bodyValues;
|
final Map<PartId, EmailBodyValue>? bodyValues;
|
||||||
|
|
||||||
ComposerCache(
|
ComposerCache({
|
||||||
this.id,
|
this.id,
|
||||||
{
|
this.mailboxIds,
|
||||||
this.mailboxIds,
|
this.subject,
|
||||||
this.subject,
|
this.from,
|
||||||
this.from,
|
this.to,
|
||||||
this.to,
|
this.cc,
|
||||||
this.cc,
|
this.bcc,
|
||||||
this.bcc,
|
this.replyTo,
|
||||||
this.replyTo,
|
this.textBody,
|
||||||
this.textBody,
|
this.htmlBody,
|
||||||
this.htmlBody,
|
this.bodyValues,
|
||||||
this.bodyValues,
|
});
|
||||||
});
|
|
||||||
|
|
||||||
factory ComposerCache.fromJson(Map<String, dynamic> json) {
|
factory ComposerCache.fromJson(Map<String, dynamic> json) {
|
||||||
return ComposerCache(
|
return ComposerCache(
|
||||||
EmailId(Id(json['id'])),
|
id: json['id'] != null ? EmailId(Id(json['id'])) : null,
|
||||||
mailboxIds: (json['mailboxIds'] as Map<String, dynamic>?)?.map((key, value) => EmailMailboxIdsConverter().parseEntry(key, value)),
|
mailboxIds: (json['mailboxIds'] as Map<String, dynamic>?)?.map((key, value) => EmailMailboxIdsConverter().parseEntry(key, value)),
|
||||||
subject: json['subject'] as String?,
|
subject: json['subject'] as String?,
|
||||||
from: (json['from'] as List<dynamic>?)?.map((json) => EmailAddress.fromJson(json)).toSet(),
|
from: (json['from'] as List<dynamic>?)?.map((json) => EmailAddress.fromJson(json)).toSet(),
|
||||||
|
|||||||
Reference in New Issue
Block a user