mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 02:38:20 +00:00
Merge "Fixing crash when the adapter is no longer available" into sc-v2-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
a71426811e
@@ -110,10 +110,13 @@ public final class WidgetsListTableViewHolderBinder
|
||||
|
||||
// When preview loads, notify adapter to rebind the item and possibly animate
|
||||
widget.applyFromCellItem(widgetItem, 1f,
|
||||
bitmap -> holder.getBindingAdapter().notifyItemChanged(
|
||||
holder.getBindingAdapterPosition(),
|
||||
Pair.create(widgetItem, bitmap)),
|
||||
holder.previewCache.get(widgetItem));
|
||||
bitmap -> {
|
||||
if (holder.getBindingAdapter() != null) {
|
||||
holder.getBindingAdapter().notifyItemChanged(
|
||||
holder.getBindingAdapterPosition(),
|
||||
Pair.create(widgetItem, bitmap));
|
||||
}
|
||||
}, holder.previewCache.get(widgetItem));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user