mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-02-08 18:48:18 +01:00
await sending a message before clearing composer (this was missing all along)
This commit is contained in:
parent
053c94b60e
commit
9f0c3b9cea
@ -47,8 +47,8 @@ export class ComposerViewModel extends ViewModel {
|
||||
return this._roomVM.isEncrypted;
|
||||
}
|
||||
|
||||
sendMessage(message) {
|
||||
const success = this._roomVM._sendMessage(message, this._replyVM);
|
||||
async sendMessage(message) {
|
||||
const success = await this._roomVM._sendMessage(message, this._replyVM);
|
||||
if (success) {
|
||||
this._isEmpty = true;
|
||||
this.emitChange("canSend");
|
||||
|
@ -69,9 +69,9 @@ export class MessageComposer extends TemplateView {
|
||||
this.value.clearReplyingTo();
|
||||
}
|
||||
|
||||
_trySend() {
|
||||
async _trySend() {
|
||||
this._input.focus();
|
||||
if (this.value.sendMessage(this._input.value)) {
|
||||
if (await this.value.sendMessage(this._input.value)) {
|
||||
this._input.value = "";
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user