Fix IndexOutOfBoundsException in RemoteViewsFactory

This commit is contained in:
Koitharu
2023-06-24 09:38:13 +03:00
parent 9d31e76cc7
commit de1a7f0ca8
2 changed files with 2 additions and 2 deletions

View File

@@ -37,7 +37,7 @@ class RecentListFactory(
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() {
val data = runBlocking { historyRepository.getList(0, 10) }

View File

@@ -40,7 +40,7 @@ class ShelfListFactory(
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() {
val data = runBlocking {