Skip to content

Commit b124692

Browse files
tddang-linagorahoangdat
authored andcommitted
TF-3171 Fix duplicate signature button on Composer view changed
1 parent e041362 commit b124692

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/features/composer/presentation/composer_controller.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,6 +1452,11 @@ class ComposerController extends BaseController with DragDropFileMixin implement
14521452
try {
14531453
if (emailContent == null) return;
14541454
final emailDocument = parse(emailContent);
1455+
1456+
final existedSignatureButton = emailDocument.querySelector(
1457+
'button.tmail-signature-button');
1458+
if (existedSignatureButton != null) return;
1459+
14551460
final signature = emailDocument.querySelector('div.tmail-signature');
14561461
if (signature == null) return;
14571462
_restoringSignatureButton = true;
@@ -1935,6 +1940,7 @@ class ComposerController extends BaseController with DragDropFileMixin implement
19351940

19361941

19371942
void handleInitHtmlEditorWeb(String initContent) async {
1943+
if (_isEmailBodyLoaded) return;
19381944
log('ComposerController::handleInitHtmlEditorWeb:');
19391945
_isEmailBodyLoaded = true;
19401946
richTextWebController?.editorController.setFullScreen();

0 commit comments

Comments
 (0)