android: reset chats search query when leaving fullscreen search
Some checks failed
Android CI / android (push) Has started running
Android Release / release (push) Has been cancelled
CI / test (push) Has been cancelled

This commit is contained in:
Codex
2026-03-09 22:10:41 +03:00
parent c4d1e7f1fb
commit 4a31612df0
2 changed files with 15 additions and 2 deletions

View File

@@ -588,3 +588,7 @@
- red `Recent` list now reads saved history with fallback.
- Connected `Очистить` action to real history cleanup in `DataStore`.
- On opening a chat from search results/messages/history, the chat is now stored in recent/history.
### Step 92 - Search filter leak fix on exit
- Fixed chats search state leak: leaving fullscreen search now resets local/global query.
- Main chats list no longer stays filtered by previous search input after returning from search mode.

View File

@@ -219,7 +219,14 @@ fun ChatListScreen(
)
}
} else if (isSearchMode) {
IconButton(onClick = { isSearchMode = false }) {
IconButton(
onClick = {
isSearchMode = false
localSearchQuery = ""
onSearchChanged("")
onGlobalSearchChanged("")
},
) {
Icon(
imageVector = Icons.AutoMirrored.Filled.ArrowBack,
contentDescription = "Back",
@@ -322,7 +329,9 @@ fun ChatListScreen(
IconButton(
onClick = {
isSearchMode = true
localSearchQuery = state.searchQuery
localSearchQuery = ""
onSearchChanged("")
onGlobalSearchChanged("")
},
) {
Icon(