Skip to content

Commit 7d0afdc

Browse files
committed
Revert "fix: Remove duplicate search results in settings (#2222)"
This reverts commit dce10aa.
1 parent dce10aa commit 7d0afdc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsSearchScreen.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import androidx.compose.runtime.NonRestartableComposable
3232
import androidx.compose.runtime.getValue
3333
import androidx.compose.runtime.produceState
3434
import androidx.compose.runtime.remember
35+
import androidx.compose.runtime.setValue
3536
import androidx.compose.ui.Alignment
3637
import androidx.compose.ui.Modifier
3738
import androidx.compose.ui.focus.FocusRequester
@@ -233,7 +234,6 @@ private fun SearchResult(
233234
}
234235
.take(10) // Just take top 10 result for quicker result
235236
.toList()
236-
.distinctBy { "${it.route::class.java.name}-${it.title}-${it.breadcrumbs}" }
237237
}
238238

239239
Crossfade(
@@ -254,9 +254,7 @@ private fun SearchResult(
254254
) {
255255
items(
256256
items = it,
257-
key = { i ->
258-
"${i.route::class.java.name}-${i.title.ifEmpty { "_" }}-${i.breadcrumbs.ifEmpty { "_" }}"
259-
},
257+
key = { i -> i.hashCode() },
260258
) { item ->
261259
Column(
262260
modifier = Modifier

0 commit comments

Comments
 (0)