Skip to content
This repository was archived by the owner on Feb 17, 2020. It is now read-only.

Commit 0c994bc

Browse files
committed
update the ids for the static items in the SearchAdapter
1 parent 01f4285 commit 0c994bc

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

app/src/main/java/net/squanchy/search/view/SearchAdapter.kt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,10 @@ internal class SearchAdapter(activity: AppCompatActivity) : RecyclerView.Adapter
111111
@Retention(AnnotationRetention.SOURCE)
112112
annotation class ViewTypeId
113113

114-
// These values are "random", we count on them not clashing with the other
115-
// random values that are used for non-hardcoded numeric IDs (for events
116-
// and speakers). This is a reasonable assumption in the Long range.
117-
// In addition, the CRC32 values we use as numeric IDs are always positive.
118-
private const val ITEM_ID_EVENTS_HEADER: Long = -1
119-
private const val ITEM_ID_SPEAKERS_HEADER: Long = -2
120-
private const val ITEM_ID_ALGOLIA_LOGO: Long = -3
114+
// These values have been calculated manually using crc32, and they are never going to overlap
115+
// with the ones from speakers, events or tracks.
116+
private const val ITEM_ID_EVENTS_HEADER: Long = 3128461027
117+
private const val ITEM_ID_SPEAKERS_HEADER: Long = 1574748858
118+
private const val ITEM_ID_ALGOLIA_LOGO: Long = 3230264564
121119
}
122120
}

0 commit comments

Comments
 (0)