fix: jump to message in search fails for messages high up in timeline (#6714)

closeSearch() added onSearchValueChanged("") in d30dde5 (content filter
feature) which triggers async apiFindMessages — this clears the items
that openChat just loaded around the target and replaces them with
initial messages. Skip the reload when openAroundItemId is already set.
This commit is contained in:
Narasimha-sc
2026-03-28 12:27:21 +00:00
committed by GitHub
parent b0e6a7bfc1
commit f4e2ccc9dc

View File

@@ -753,7 +753,9 @@ fun ChatView(
changeNtfsState = { enabled, currentValue -> toggleNotifications(chatRh, chatInfo, enabled, chatModel, currentValue) },
onSearchValueChanged = onSearchValueChanged,
closeSearch = {
onSearchValueChanged("")
if (chatModel.openAroundItemId.value == null) {
onSearchValueChanged("")
}
showSearch.value = false
searchText.value = ""
contentFilter.value = null