mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2026-01-31 23:30:18 +00:00
Add deprecation to LocalItemListAdapter.showFooter(true)
This commit is contained in:
@@ -212,6 +212,8 @@ public abstract class BaseLocalListFragment<I, N> extends BaseStateFragment<I>
|
||||
showListFooter(false);
|
||||
}
|
||||
|
||||
@Deprecated(since = "Calling this method with `true` may cause crashes, see "
|
||||
+ "https://github.com/TeamNewPipe/NewPipe/pull/12996#pullrequestreview-3713317115")
|
||||
@Override
|
||||
public void showListFooter(final boolean show) {
|
||||
if (itemsList == null) {
|
||||
|
||||
@@ -207,6 +207,8 @@ public class LocalItemListAdapter extends RecyclerView.Adapter<RecyclerView.View
|
||||
return this.headerSupplier != null;
|
||||
}
|
||||
|
||||
@Deprecated(since = "Calling this method with `true` may cause crashes, see "
|
||||
+ "https://github.com/TeamNewPipe/NewPipe/pull/12996#pullrequestreview-3713317115")
|
||||
public void showFooter(final boolean show) {
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "showFooter() called with: show = [" + show + "]");
|
||||
@@ -217,6 +219,8 @@ public class LocalItemListAdapter extends RecyclerView.Adapter<RecyclerView.View
|
||||
|
||||
showFooter = show;
|
||||
if (show) {
|
||||
Log.w(TAG, "Calling LocalItemListAdapter.showFooter(true) may cause crashes, see https"
|
||||
+ "://github.com/TeamNewPipe/NewPipe/pull/12996#pullrequestreview-3713317115");
|
||||
notifyItemInserted(sizeConsideringHeader());
|
||||
} else {
|
||||
notifyItemRemoved(sizeConsideringHeader());
|
||||
|
||||
Reference in New Issue
Block a user