add composer, update cannotSendMessage guard to block empty messages

This commit is contained in:
marlon-erler
2024-07-20 21:15:06 +02:00
parent 0920cff5b5
commit 757dbf9947
6 changed files with 72 additions and 10 deletions
+4 -2
View File
@@ -155,8 +155,10 @@ export default class ChatViewModel {
);
this.cannotSendMessage = React.createProxyState(
[this.settingsViewModel.username],
() => this.settingsViewModel.username.value == ""
[this.settingsViewModel.username, this.composingMessage],
() =>
this.settingsViewModel.username.value == "" ||
this.composingMessage.value == ""
);
this.color.value = chatModel.color;