android: reset chats search query when leaving fullscreen search
This commit is contained in:
@@ -588,3 +588,7 @@
|
|||||||
- red `Recent` list now reads saved history with fallback.
|
- red `Recent` list now reads saved history with fallback.
|
||||||
- Connected `Очистить` action to real history cleanup in `DataStore`.
|
- 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.
|
- 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.
|
||||||
|
|||||||
@@ -219,7 +219,14 @@ fun ChatListScreen(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
} else if (isSearchMode) {
|
} else if (isSearchMode) {
|
||||||
IconButton(onClick = { isSearchMode = false }) {
|
IconButton(
|
||||||
|
onClick = {
|
||||||
|
isSearchMode = false
|
||||||
|
localSearchQuery = ""
|
||||||
|
onSearchChanged("")
|
||||||
|
onGlobalSearchChanged("")
|
||||||
|
},
|
||||||
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.AutoMirrored.Filled.ArrowBack,
|
imageVector = Icons.AutoMirrored.Filled.ArrowBack,
|
||||||
contentDescription = "Back",
|
contentDescription = "Back",
|
||||||
@@ -322,7 +329,9 @@ fun ChatListScreen(
|
|||||||
IconButton(
|
IconButton(
|
||||||
onClick = {
|
onClick = {
|
||||||
isSearchMode = true
|
isSearchMode = true
|
||||||
localSearchQuery = state.searchQuery
|
localSearchQuery = ""
|
||||||
|
onSearchChanged("")
|
||||||
|
onGlobalSearchChanged("")
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
|
|||||||
Reference in New Issue
Block a user