diff --git a/lib/features/composer/presentation/composer_controller.dart b/lib/features/composer/presentation/composer_controller.dart index a62ebfa680..8a0a203acc 100644 --- a/lib/features/composer/presentation/composer_controller.dart +++ b/lib/features/composer/presentation/composer_controller.dart @@ -1445,6 +1445,11 @@ class ComposerController extends BaseController with DragDropFileMixin implement try { if (emailContent == null) return; final emailDocument = parse(emailContent); + + final existedSignatureButton = emailDocument.querySelector( + 'button.tmail-signature-button'); + if (existedSignatureButton != null) return; + final signature = emailDocument.querySelector('div.tmail-signature'); if (signature == null) return; await _applySignature(signature.innerHtml); @@ -1927,6 +1932,7 @@ class ComposerController extends BaseController with DragDropFileMixin implement void handleInitHtmlEditorWeb(String initContent) async { + if (_isEmailBodyLoaded) return; log('ComposerController::handleInitHtmlEditorWeb:'); _isEmailBodyLoaded = true; richTextWebController?.editorController.setFullScreen();