Skip to content

Commit d7dffb7

Browse files
committed
Add deprecation to LocalItemListAdapter.showFooter(true)
1 parent d0f32b3 commit d7dffb7

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

app/src/main/java/org/schabi/newpipe/local/BaseLocalListFragment.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@ public void showEmptyState() {
212212
showListFooter(false);
213213
}
214214

215+
@Deprecated(since = "Calling this method with `true` may cause crashes, see "
216+
+ "https://github.com/TeamNewPipe/NewPipe/pull/12996#pullrequestreview-3713317115")
215217
@Override
216218
public void showListFooter(final boolean show) {
217219
if (itemsList == null) {

app/src/main/java/org/schabi/newpipe/local/LocalItemListAdapter.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@ protected boolean hasHeader() {
207207
return this.headerSupplier != null;
208208
}
209209

210+
@Deprecated(since = "Calling this method with `true` may cause crashes, see "
211+
+ "https://github.com/TeamNewPipe/NewPipe/pull/12996#pullrequestreview-3713317115")
210212
public void showFooter(final boolean show) {
211213
if (DEBUG) {
212214
Log.d(TAG, "showFooter() called with: show = [" + show + "]");
@@ -217,6 +219,8 @@ public void showFooter(final boolean show) {
217219

218220
showFooter = show;
219221
if (show) {
222+
Log.w(TAG, "Calling LocalItemListAdapter.showFooter(true) may cause crashes, see https"
223+
+ "://github.com/TeamNewPipe/NewPipe/pull/12996#pullrequestreview-3713317115");
220224
notifyItemInserted(sizeConsideringHeader());
221225
} else {
222226
notifyItemRemoved(sizeConsideringHeader());

0 commit comments

Comments
 (0)