TF-295 Save drafts email when close composer on web browser

This commit is contained in:
dab246
2022-03-16 18:38:29 +07:00
committed by Dat H. Pham
parent b0198640a4
commit b0bb43fdd4
2 changed files with 15 additions and 5 deletions
@@ -103,7 +103,10 @@ class ComposerView extends GetWidget<ComposerController> {
child: buildIconWeb(
icon: SvgPicture.asset(imagePaths.icCloseComposer, color: Colors.white, fit: BoxFit.fill),
tooltip: AppLocalizations.of(context).close,
onTap: () => controller.closeComposerWeb())),
onTap: () {
controller.saveEmailAsDrafts(context);
controller.closeComposerWeb();
})),
]
))
)
@@ -194,7 +197,10 @@ class ComposerView extends GetWidget<ComposerController> {
buildIconWeb(
icon: SvgPicture.asset(imagePaths.icCloseComposer, fit: BoxFit.fill),
tooltip: AppLocalizations.of(context).close,
onTap: () => controller.closeComposerWeb()),
onTap: () {
controller.saveEmailAsDrafts(context);
controller.closeComposerWeb();
}),
]
),
);
@@ -209,7 +215,10 @@ class ComposerView extends GetWidget<ComposerController> {
buildIconWeb(
icon: SvgPicture.asset(imagePaths.icCloseComposer, fit: BoxFit.fill),
tooltip: AppLocalizations.of(context).close,
onTap: () => controller.closeComposerWeb()),
onTap: () {
controller.saveEmailAsDrafts(context);
controller.closeComposerWeb();
}),
Spacer(),
buildIconWeb(
icon: SvgPicture.asset(imagePaths.icAttachmentsComposer, fit: BoxFit.fill),