1
0
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:
Stypox
2026-01-27 21:32:15 +01:00
parent d0f32b3842
commit d7dffb7a90
2 changed files with 6 additions and 0 deletions

View File

@@ -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) {

View File

@@ -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());