Skip to content

Commit

Permalink
TF-3171 Fix duplicate signature button on Composer view changed
Browse files Browse the repository at this point in the history
  • Loading branch information
tddang-linagora authored and hoangdat committed Oct 7, 2024
1 parent e041362 commit b124692
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/features/composer/presentation/composer_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1452,6 +1452,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;
_restoringSignatureButton = true;
Expand Down Expand Up @@ -1935,6 +1940,7 @@ class ComposerController extends BaseController with DragDropFileMixin implement


void handleInitHtmlEditorWeb(String initContent) async {
if (_isEmailBodyLoaded) return;
log('ComposerController::handleInitHtmlEditorWeb:');
_isEmailBodyLoaded = true;
richTextWebController?.editorController.setFullScreen();
Expand Down

0 comments on commit b124692

Please sign in to comment.