Fix IndexOutOfBoundsException in RemoteViewsFactory

pull/401/head
Koitharu 3 years ago
parent 9d31e76cc7
commit de1a7f0ca8
No known key found for this signature in database
GPG Key ID: 8E861F8CE6E7CE27

@ -37,7 +37,7 @@ class RecentListFactory(
override fun getLoadingView() = null override fun getLoadingView() = null
override fun getItemId(position: Int) = dataSet[position].id override fun getItemId(position: Int) = dataSet.getOrNull(position)?.id ?: 0L
override fun onDataSetChanged() { override fun onDataSetChanged() {
val data = runBlocking { historyRepository.getList(0, 10) } val data = runBlocking { historyRepository.getList(0, 10) }

@ -40,7 +40,7 @@ class ShelfListFactory(
override fun getLoadingView() = null override fun getLoadingView() = null
override fun getItemId(position: Int) = dataSet[position].id override fun getItemId(position: Int) = dataSet.getOrNull(position)?.id ?: 0L
override fun onDataSetChanged() { override fun onDataSetChanged() {
val data = runBlocking { val data = runBlocking {

Loading…
Cancel
Save