Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TF-3171 Fix duplicate signature button on Composer view changed #3191

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -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);
Expand Down Expand Up @@ -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();
Expand Down
Loading