TF-524 Open email detailed from quick search
This commit is contained in:
@@ -17,7 +17,7 @@ class DashBoardAction extends UIAction {
|
||||
|
||||
class ComposeEmailAction extends DashBoardAction {
|
||||
|
||||
RouterArguments? arguments;
|
||||
final RouterArguments? arguments;
|
||||
|
||||
ComposeEmailAction({this.arguments});
|
||||
|
||||
@@ -67,8 +67,8 @@ class MarkAsReadAllEmailAction extends DashBoardAction {
|
||||
|
||||
class FilterMessageAction extends DashBoardAction {
|
||||
|
||||
BuildContext context;
|
||||
FilterMessageOption option;
|
||||
final BuildContext context;
|
||||
final FilterMessageOption option;
|
||||
|
||||
FilterMessageAction(this.context, this.option);
|
||||
|
||||
@@ -78,9 +78,9 @@ class FilterMessageAction extends DashBoardAction {
|
||||
|
||||
class HandleEmailActionTypeAction extends DashBoardAction {
|
||||
|
||||
BuildContext context;
|
||||
EmailActionType emailAction;
|
||||
List<PresentationEmail> listEmailSelected;
|
||||
final BuildContext context;
|
||||
final EmailActionType emailAction;
|
||||
final List<PresentationEmail> listEmailSelected;
|
||||
|
||||
HandleEmailActionTypeAction(this.context, this.listEmailSelected, this.emailAction);
|
||||
|
||||
@@ -88,10 +88,13 @@ class HandleEmailActionTypeAction extends DashBoardAction {
|
||||
List<Object> get props => [listEmailSelected, emailAction];
|
||||
}
|
||||
|
||||
class GoToSettingsAction extends DashBoardAction {
|
||||
class OpenEmailDetailedAction extends DashBoardAction {
|
||||
|
||||
GoToSettingsAction();
|
||||
final BuildContext context;
|
||||
final PresentationEmail presentationEmail;
|
||||
|
||||
OpenEmailDetailedAction(this.context, this.presentationEmail);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [];
|
||||
List<Object?> get props => [presentationEmail];
|
||||
}
|
||||
@@ -450,8 +450,7 @@ class MailboxDashBoardView extends BaseMailboxDashBoardView {
|
||||
color: Colors.white,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(16)),
|
||||
constraints: BoxConstraints(
|
||||
maxWidth: responsiveUtils.isDesktop(context) ? 556 : double.infinity,
|
||||
maxHeight: 322),
|
||||
maxWidth: responsiveUtils.isDesktop(context) ? 556 : double.infinity),
|
||||
),
|
||||
listActionButton: const [
|
||||
QuickSearchFilter.hasAttachment,
|
||||
@@ -498,8 +497,8 @@ class MailboxDashBoardView extends BaseMailboxDashBoardView {
|
||||
itemBuilder: (context, email) {
|
||||
return EmailQuickSearchItemTileWidget(email, controller.selectedMailbox.value);
|
||||
},
|
||||
onSuggestionSelected: (autoCompleteResult) async {
|
||||
|
||||
onSuggestionSelected: (presentationEmail) async {
|
||||
controller.dispatchAction(OpenEmailDetailedAction(context, presentationEmail));
|
||||
}),
|
||||
)),
|
||||
const SizedBox(width: 16),
|
||||
|
||||
@@ -264,6 +264,9 @@ class ThreadController extends BaseController {
|
||||
} if (action is HandleEmailActionTypeAction) {
|
||||
pressEmailSelectionAction(action.context, action.emailAction, action.listEmailSelected);
|
||||
mailboxDashBoardController.clearDashBoardAction();
|
||||
} if (action is OpenEmailDetailedAction) {
|
||||
pressEmailAction(action.context, EmailActionType.preview, action.presentationEmail);
|
||||
mailboxDashBoardController.clearDashBoardAction();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user