FIX: cancels saving draft when composer is destroyed (#21260)

This commit is contained in:
Joffrey JAFFEUX 2023-04-26 19:42:57 +02:00 committed by GitHub
parent d381629655
commit 36db953bc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -30,6 +30,7 @@
{{did-update this.didUpdateInReplyTo this.currentMessage.inReplyTo}}
{{did-insert this.setupAppEvents}}
{{will-destroy this.teardownAppEvents}}
{{will-destroy this.cancelPersistDraft}}
>
<div class="chat-composer__outer-container">
<div class="chat-composer__inner-container">

View File

@ -98,6 +98,11 @@ export default class ChatComposer extends Component {
this.persistDraft();
}
@action
cancelPersistDraft() {
cancel(this._persistHandler);
}
get currentMessage() {
return this.composer.message;
}