Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

Commit 5d284bf

Browse files
authored
Merge pull request #994 from claraf3/fix-cast
fix CheeseViewModel insertSeparators comparison
2 parents 1a9305b + 5e86e72 commit 5d284bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PagingSample/app/src/main/java/paging/android/example/com/pagingsample/CheeseViewModel.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class CheeseViewModel(private val dao: CheeseDao) : ViewModel() {
7878
} else if (before == null) {
7979
// Header
8080
CheeseListItem.Separator(after.name.first())
81-
} else if (before.name.first() != after.name.first()) {
81+
} else if (!before.name.first().equals(after.name.first(), ignoreCase = true)){
8282
// Between two items that start with different letters.
8383
CheeseListItem.Separator(after.name.first())
8484
} else {

0 commit comments

Comments
 (0)