Fix crash when suggestions have the same keyword
This commit is contained in:
1 parent
8aaad071ea
commit
eeed56b211
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 }) {
|
||||
items(mSuggestionList, key = { it.keyword.hashCode() * 31 + it.hint.hashCode() }) {
|
||||
ListItem(
|
||||
headlineContent = { Text(text = it.keyword) },
|
||||
supportingContent = it.hint.ifNotNullThen { Text(text = it.hint!!) },
|
||||
|
||||
Reference in new issue
Block a user