mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-08-08 06:46:11 +00:00
When a slash command is sent without tapping the autocomplete list, the command popup stays on screen with its old suggestions. The send path clears the input field in code, and the popup is hidden only from the field's text-change handler, which a code-driven clear does not run, so the show flag is never turned off. The mention popup has the same cause. CommandProcessor gains clearSuggestions(), which hides both popups and empties their lists, the same resets the two select functions already do inline. ChatScreen's send handler calls it where it already resets the field. The private chat sheet called updateMentionSuggestions on every keystroke while rendering its own popups as hidden, so the only effect was on the main composer behind it: typing @ in the sheet and then sending or dismissing left a stale mention popup on the main screen. That call is removed. Tests in CommandProcessorTest open each popup and assert clearSuggestions hides it. The unit tests do not drive Compose, so they cover the function the send handler calls rather than the handler itself. Full Android unit suite green; lint and the debug build pass. Fixes #250.