TF-3622 Add integration test for case deformed inlined image
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -196,6 +196,7 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
|
||||
final isEmailContentClipped = RxBool(false);
|
||||
final attendanceStatus = Rxn<AttendanceStatus>();
|
||||
|
||||
GlobalKey<HtmlContentViewState>? htmlContentViewKey;
|
||||
EmailId? _currentEmailId;
|
||||
Identity? _identitySelected;
|
||||
ButtonState? _printEmailButtonState;
|
||||
@@ -243,6 +244,9 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
|
||||
void onInit() {
|
||||
_registerObxStreamListener();
|
||||
_listenDownloadAttachmentProgressState();
|
||||
if (PlatformInfo.isIntegrationTesting) {
|
||||
htmlContentViewKey = GlobalKey<HtmlContentViewState>();
|
||||
}
|
||||
super.onInit();
|
||||
}
|
||||
|
||||
@@ -250,6 +254,9 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
|
||||
void onClose() {
|
||||
_downloadProgressStateController.close();
|
||||
_attachmentListScrollController.dispose();
|
||||
if (PlatformInfo.isIntegrationTesting) {
|
||||
htmlContentViewKey = null;
|
||||
}
|
||||
super.onClose();
|
||||
}
|
||||
|
||||
|
||||
@@ -447,6 +447,7 @@ class EmailView extends GetWidget<SingleEmailController> {
|
||||
),
|
||||
child: LayoutBuilder(builder: (context, constraints) {
|
||||
return HtmlContentViewer(
|
||||
key: controller.htmlContentViewKey,
|
||||
contentHtml: allEmailContents,
|
||||
initialWidth: constraints.maxWidth,
|
||||
direction: AppUtils.getCurrentDirection(context),
|
||||
@@ -486,6 +487,7 @@ class EmailView extends GetWidget<SingleEmailController> {
|
||||
),
|
||||
child: LayoutBuilder(builder: (context, constraints) {
|
||||
return HtmlContentViewer(
|
||||
key: controller.htmlContentViewKey,
|
||||
contentHtml: allEmailContents,
|
||||
initialWidth: constraints.maxWidth,
|
||||
direction: AppUtils.getCurrentDirection(context),
|
||||
|
||||
Reference in New Issue
Block a user