mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-23 08:33:09 +00:00
android, desktop: hide the banners and cards above the chats while online search results are shown
While a "Search in Directory" or Search key search runs or shows results, the chat list leaves out its banner slot, the reachable toolbar card and the connect cards. Typing alone, which only filters the chats, keeps them, and they come back when the results go.
This commit is contained in:
1 parent
05b8f33f81
commit
b402bf4b3e
3 files changed
+16
-12
No files matched your search
+5
-3
@@ -1138,14 +1138,16 @@ private fun BoxScope.ChatList(searchText: MutableState<TextFieldValue>, listStat
|
||||
ChatListSearchBarWithTags(listState, searchText, searchShowingSimplexLink, searchChatFilteredBySimplexLink, connectNameCandidate, onlineSearch)
|
||||
}
|
||||
}
|
||||
if (!oneHandUICardShown.value) {
|
||||
if (!oneHandUICardShown.value && !onlineSearch.showResults) {
|
||||
item {
|
||||
ToggleChatListCard()
|
||||
}
|
||||
}
|
||||
// one slot: a badge the user paid for ending outranks the pitch to get one
|
||||
val alert = BadgeModel.alert.value
|
||||
if (supportEnded() && alert != null) {
|
||||
if (onlineSearch.showResults) {
|
||||
// banners give way to online results
|
||||
} else if (supportEnded() && alert != null) {
|
||||
item {
|
||||
SideEffect { chatModel.chatListBanner = ChatListBanner.BadgeExpired }
|
||||
Box(Modifier.zIndex(1f).padding(16.dp)) {
|
||||
@@ -1204,7 +1206,7 @@ private fun BoxScope.ChatList(searchText: MutableState<TextFieldValue>, listStat
|
||||
}
|
||||
nameRows(rows.names, oneHandUI.value)
|
||||
directoryRows(rows, onlineSearch, oneHandUI.value)
|
||||
if (!addressCreationCardShown.value) {
|
||||
if (!addressCreationCardShown.value && !onlineSearch.showResults) {
|
||||
item {
|
||||
ChatListFeatureCards()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user