2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-19 09:25:34 +00:00

[fenix] For https://github.com/mozilla-mobile/fenix/issues/357 - Adds some descriptive comments for temporary values

This commit is contained in:
Jeff Boek 2019-02-15 14:34:11 -08:00
parent d68e21c9ad
commit 4c1dcb7383

View File

@ -210,12 +210,16 @@ class HistoryAdapter(
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) { override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
when (holder) { when (holder) {
is HistoryDeleteViewHolder -> holder.bind(mode) is HistoryDeleteViewHolder -> holder.bind(mode)
// Temporarily hard code the header until
// we build out support for time based sections
is HistoryHeaderViewHolder -> holder.bind("Today") is HistoryHeaderViewHolder -> holder.bind("Today")
is HistoryListItemViewHolder -> holder.bind(items[position - NUMBER_OF_SECTIONS], mode) is HistoryListItemViewHolder -> holder.bind(items[position - NUMBER_OF_SECTIONS], mode)
} }
} }
companion object { companion object {
// Temporarily hard code the number of sections until
// we build out support for time based sections
private const val NUMBER_OF_SECTIONS = 2 private const val NUMBER_OF_SECTIONS = 2
} }
} }