Fix crashes
This commit is contained in:
@@ -48,7 +48,7 @@ class RecentListFactory(
|
||||
|
||||
override fun getViewAt(position: Int): RemoteViews {
|
||||
val views = RemoteViews(context.packageName, R.layout.item_recent)
|
||||
val item = dataSet[position]
|
||||
val item = dataSet.getOrNull(position) ?: return views
|
||||
runCatching {
|
||||
coil.executeBlocking(
|
||||
ImageRequest.Builder(context)
|
||||
|
||||
@@ -58,7 +58,7 @@ class ShelfListFactory(
|
||||
|
||||
override fun getViewAt(position: Int): RemoteViews {
|
||||
val views = RemoteViews(context.packageName, R.layout.item_shelf)
|
||||
val item = dataSet[position]
|
||||
val item = dataSet.getOrNull(position) ?: return views
|
||||
views.setTextViewText(R.id.textView_title, item.title)
|
||||
runCatching {
|
||||
coil.executeBlocking(
|
||||
|
||||
Reference in New Issue
Block a user