Fix display attachment when reply or forward email
This commit is contained in:
@@ -56,7 +56,7 @@ class ComposerController extends BaseController {
|
||||
final _appToast = Get.find<AppToast>();
|
||||
final _imagePaths = Get.find<ImagePaths>();
|
||||
|
||||
final expandModeAttachments = ExpandMode.EXPAND.obs;
|
||||
final expandModeAttachments = ExpandMode.COLLAPSE.obs;
|
||||
final composerArguments = Rxn<ComposerArguments>();
|
||||
final isEnableEmailSendButton = false.obs;
|
||||
final isInitialRecipient = false.obs;
|
||||
@@ -198,6 +198,7 @@ class ComposerController extends BaseController {
|
||||
}
|
||||
_initToEmailAddress(arguments);
|
||||
_initSubjectEmail(arguments);
|
||||
_initAttachments(arguments);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,6 +211,11 @@ class ComposerController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
void _initAttachments(ComposerArguments arguments) {
|
||||
attachments.value = arguments.attachments ?? [];
|
||||
initialAttachments = arguments.attachments ?? [];
|
||||
}
|
||||
|
||||
String? getContentEmail(BuildContext context) {
|
||||
if (composerArguments.value != null) {
|
||||
switch(composerArguments.value!.emailActionType) {
|
||||
|
||||
@@ -444,7 +444,12 @@ class ComposerView extends GetWidget<ComposerController> {
|
||||
padding: EdgeInsets.symmetric(horizontal: responsiveUtils.isMobile(context) ? 8 : 10),
|
||||
child: _buildEditor(context, initContent)));
|
||||
} else {
|
||||
return SizedBox.shrink();
|
||||
return Padding(
|
||||
padding: EdgeInsets.all(16),
|
||||
child: SizedBox(
|
||||
width: 30,
|
||||
height: 30,
|
||||
child: CupertinoActivityIndicator(color: AppColor.colorLoading)));
|
||||
}
|
||||
} else {
|
||||
final initContent = controller.textEditorWeb ?? controller.getEmailContentQuotedAsHtml(context, controller.composerArguments.value!);
|
||||
|
||||
Reference in New Issue
Block a user