Fixed double messaging when live typing
This commit is contained in:
parent
5663a5f376
commit
5fd401bfb6
@ -191,9 +191,7 @@ levenshteinDistance(a, b) {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
const message = me.replaceMentionsWithAuthors(this.value);
|
const message = me.replaceMentionsWithAuthors(this.value);
|
||||||
this.messageUid = null;
|
e.target.value = "";
|
||||||
this.value = "";
|
|
||||||
this.previousValue = "";
|
|
||||||
|
|
||||||
if (!message) {
|
if (!message) {
|
||||||
return;
|
return;
|
||||||
@ -208,12 +206,11 @@ levenshteinDistance(a, b) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
e.target.value = "";
|
this.updateMessage()
|
||||||
|
|
||||||
this.value = "";
|
this.value = "";
|
||||||
|
this.previousValue = "";
|
||||||
this.messageUid = null;
|
this.messageUid = null;
|
||||||
this.sendMessage(this.channelUid, message).then((uid) => {
|
|
||||||
this.messageUid = uid;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -260,9 +257,11 @@ levenshteinDistance(a, b) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.sendMessage(this.channelUid, this.value).then((uid) => {
|
this.sendMessage(this.channelUid, this.value).then((uid) => {
|
||||||
this.messageUid = uid;
|
if (this.liveType) {
|
||||||
|
this.messageUid = uid;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
updateMessage() {
|
updateMessage() {
|
||||||
if (this.value[0] == "/") {
|
if (this.value[0] == "/") {
|
||||||
|
Loading…
Reference in New Issue
Block a user