mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 10:48:19 +00:00
Merge "Fixing crash when the adapter is no longer available" into sc-v2-dev am: a71426811e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15625882 Change-Id: I45f56251781d569ffda3d19f1a1db73b7004885d
This commit is contained in:
@@ -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