TF-1915 SendingState of SendingEmail updates according to the work done in WorkManager when network connectivity is restored
(cherry picked from commit 744c8bc8dc8a82cb3afb75aead5a744adaae5501)
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
|
||||
import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||
|
||||
enum SendingEmailActionType {
|
||||
create,
|
||||
edit,
|
||||
delete;
|
||||
|
||||
@@ -13,6 +14,8 @@ enum SendingEmailActionType {
|
||||
return AppLocalizations.of(context).delete;
|
||||
case SendingEmailActionType.edit:
|
||||
return AppLocalizations.of(context).edit;
|
||||
case SendingEmailActionType.create:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +25,8 @@ enum SendingEmailActionType {
|
||||
return 'button_delete_sending_email';
|
||||
case SendingEmailActionType.edit:
|
||||
return 'button_edit_sending_email';
|
||||
case SendingEmailActionType.create:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +36,8 @@ enum SendingEmailActionType {
|
||||
return AppColor.colorDeletePermanentlyButton;
|
||||
case SendingEmailActionType.edit:
|
||||
return AppColor.primaryColor;
|
||||
case SendingEmailActionType.create:
|
||||
return Colors.transparent;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +47,8 @@ enum SendingEmailActionType {
|
||||
return AppColor.colorDeletePermanentlyButton;
|
||||
case SendingEmailActionType.edit:
|
||||
return AppColor.primaryColor;
|
||||
case SendingEmailActionType.create:
|
||||
return Colors.transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import 'package:jmap_dart_client/jmap/account_id.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/session/session.dart';
|
||||
import 'package:tmail_ui_user/features/composer/domain/model/email_request.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox/domain/model/create_new_mailbox_request.dart';
|
||||
import 'package:tmail_ui_user/features/sending_queue/presentation/model/sending_email_action_type.dart';
|
||||
import 'package:tmail_ui_user/main/routes/router_arguments.dart';
|
||||
|
||||
class SendingEmailArguments extends RouterArguments {
|
||||
final Session session;
|
||||
final AccountId accountId;
|
||||
final EmailRequest emailRequest;
|
||||
final CreateNewMailboxRequest? mailboxRequest;
|
||||
final SendingEmailActionType sendingEmailActionType;
|
||||
|
||||
SendingEmailArguments(
|
||||
this.session,
|
||||
this.accountId,
|
||||
this.emailRequest,
|
||||
this.mailboxRequest,
|
||||
{
|
||||
this.sendingEmailActionType = SendingEmailActionType.create
|
||||
}
|
||||
);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
session,
|
||||
accountId,
|
||||
emailRequest,
|
||||
mailboxRequest,
|
||||
sendingEmailActionType
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user