mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2024-12-24 16:02:13 +01:00
Fixed header not updating after feed refresh
This commit is contained in:
parent
4da4b0e1c2
commit
8e10b986b2
@ -407,7 +407,6 @@ public class FeedItemlistFragment extends Fragment implements AdapterView.OnItem
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onFeedListChanged(FeedListUpdateEvent event) {
|
||||
if (event.contains(feed)) {
|
||||
refreshHeaderView();
|
||||
updateUi();
|
||||
}
|
||||
}
|
||||
@ -441,7 +440,8 @@ public class FeedItemlistFragment extends Fragment implements AdapterView.OnItem
|
||||
}
|
||||
|
||||
private void refreshHeaderView() {
|
||||
if (recyclerView == null || feed == null || !headerCreated) {
|
||||
setupHeaderView();
|
||||
if (recyclerView == null || feed == null) {
|
||||
Log.e(TAG, "Unable to refresh header view");
|
||||
return;
|
||||
}
|
||||
@ -487,7 +487,6 @@ public class FeedItemlistFragment extends Fragment implements AdapterView.OnItem
|
||||
}
|
||||
});
|
||||
headerCreated = true;
|
||||
refreshHeaderView();
|
||||
}
|
||||
|
||||
private void showFeedInfo() {
|
||||
@ -528,7 +527,7 @@ public class FeedItemlistFragment extends Fragment implements AdapterView.OnItem
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(result -> {
|
||||
feed = result.orElse(null);
|
||||
setupHeaderView();
|
||||
refreshHeaderView();
|
||||
displayList();
|
||||
}, error -> Log.e(TAG, Log.getStackTraceString(error)));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user