Add deprecation to LocalItemListAdapter.showFooter(true)
This commit is contained in:
parent
4ff958eef5
commit
03abf7a950
2 changed files with 6 additions and 0 deletions
|
|
@ -212,6 +212,8 @@ public abstract class BaseLocalListFragment<I, N> extends BaseStateFragment<I>
|
||||||
showListFooter(false);
|
showListFooter(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated(since = "Calling this method with `true` may cause crashes, see "
|
||||||
|
+ "https://github.com/TeamNewPipe/NewPipe/pull/12996#pullrequestreview-3713317115")
|
||||||
@Override
|
@Override
|
||||||
public void showListFooter(final boolean show) {
|
public void showListFooter(final boolean show) {
|
||||||
if (itemsList == null) {
|
if (itemsList == null) {
|
||||||
|
|
|
||||||
|
|
@ -207,6 +207,8 @@ public class LocalItemListAdapter extends RecyclerView.Adapter<RecyclerView.View
|
||||||
return this.headerSupplier != null;
|
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) {
|
public void showFooter(final boolean show) {
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
Log.d(TAG, "showFooter() called with: show = [" + show + "]");
|
Log.d(TAG, "showFooter() called with: show = [" + show + "]");
|
||||||
|
|
@ -217,6 +219,8 @@ public class LocalItemListAdapter extends RecyclerView.Adapter<RecyclerView.View
|
||||||
|
|
||||||
showFooter = show;
|
showFooter = show;
|
||||||
if (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());
|
notifyItemInserted(sizeConsideringHeader());
|
||||||
} else {
|
} else {
|
||||||
notifyItemRemoved(sizeConsideringHeader());
|
notifyItemRemoved(sizeConsideringHeader());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue