From 2ac1bc1a37b5221cf8f4b70412536204592e655a Mon Sep 17 00:00:00 2001 From: Tommy Chow Date: Thu, 28 Jul 2022 22:35:29 -0400 Subject: [PATCH] Fix badges not showing up for logged in user I can't 100% confirm since I don't have third-party badges (brokee) but it should work! --- lib/screens/channel/stores/chat_store.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/screens/channel/stores/chat_store.dart b/lib/screens/channel/stores/chat_store.dart index a4cb8051..1ade5138 100644 --- a/lib/screens/channel/stores/chat_store.dart +++ b/lib/screens/channel/stores/chat_store.dart @@ -243,7 +243,9 @@ abstract class ChatStoreBase with Store { continue; case Command.userState: _userState = _userState.fromIRCMessage(parsedIRCMessage); + if (toSend != null) { + textController.clear(); _messageBuffer.add(toSend!); toSend = null; } @@ -395,12 +397,10 @@ abstract class ChatStoreBase with Store { final userChatMessage = IRCMessage.fromString(userStateString); userChatMessage.localEmotes?.addAll(assetsStore.userEmoteToObject); + if (auth.isLoggedIn && auth.user.details != null) userChatMessage.tags['user-id'] = auth.user.details!.id; toSend = userChatMessage; } - - // Clear the previous input in the TextField. - textController.clear(); } }