Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class SearchViewModel @Inject constructor(private val repository: SearchReposito
}

/** Clears the list of associations and sets the search status to [Status.IDLE]. */
private fun clearAssociations() {
fun clearAssociations() {
_associations.value = emptyList()
status.value = Status.IDLE
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ fun AssociationSearchBar(
var searchQuery by remember { mutableStateOf("") }
var isExpanded by rememberSaveable { mutableStateOf(false) }
val associationResults by searchViewModel.associations.collectAsState()
searchViewModel.clearAssociations()
val searchState by searchViewModel.status.collectAsState()
val context = LocalContext.current

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.filled.Add
import androidx.compose.material.icons.outlined.Clear
import androidx.compose.material.icons.rounded.Clear
import androidx.compose.material3.Button
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
Expand Down
Loading