Removed sending chat msgs with no text

This commit is contained in:
Vishal 2024-06-21 01:12:28 +05:30 committed by GitHub
parent 1a1003a8c6
commit 3773c5902c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -578,8 +578,10 @@ class PartyWindow(bui.Window):
self._popup_party_member_is_host = is_host
def _send_chat_message(self) -> None:
bs.chatmessage(cast(str, bui.textwidget(query=self._text_field)))
bui.textwidget(edit=self._text_field, text='')
text = cast(str, bui.textwidget(query=self._text_field)).strip()
if text != '':
bs.chatmessage(text)
bui.textwidget(edit=self._text_field, text='')
def close(self) -> None:
"""Close the window."""