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