Fix crash when suggestions have the same keyword

This commit is contained in:
FooIbar committed 2023-12-29 09:51:00 +08:00
1 parent 09839086a2
commit e0eef82ed8
1 file changed
+1 -1
@@ -332,7 +332,7 @@ fun SearchBarScreen(
contentPadding = WindowInsets.navigationBars.union(WindowInsets.ime)
.only(WindowInsetsSides.Bottom).asPaddingValues(),
) {
items(mSuggestionList, key = { it.keyword.hashCode() * 31 + it.hint.hashCode() }) {
items(mSuggestionList, key = { it.keyword.hashCode() * 31 + it.canDelete.hashCode() }) {
ListItem(
headlineContent = { Text(text = it.keyword) },
supportingContent = it.hint.ifNotNullThen { Text(text = it.hint!!) },