mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-21 20:47:03 -05:00
Fix crash in chapters list #159
This commit is contained in:
parent
96d498e7e5
commit
b33da641d9
2 changed files with 10 additions and 1 deletions
|
@ -100,6 +100,15 @@ public class ChaptersFragment extends BaseRxFragment<ChaptersPresenter> implemen
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPause() {
|
||||||
|
// Stop recycler's scrolling when onPause is called. If the activity is finishing
|
||||||
|
// the presenter will be destroyed, and it could cause NPE
|
||||||
|
// https://github.com/inorichi/tachiyomi/issues/159
|
||||||
|
recyclerView.stopScroll();
|
||||||
|
super.onPause();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||||
inflater.inflate(R.menu.chapters, menu);
|
inflater.inflate(R.menu.chapters, menu);
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class ChaptersPresenter extends BasePresenter<ChaptersFragment> {
|
||||||
@Inject PreferencesHelper preferences;
|
@Inject PreferencesHelper preferences;
|
||||||
@Inject DownloadManager downloadManager;
|
@Inject DownloadManager downloadManager;
|
||||||
|
|
||||||
@State Manga manga;
|
private Manga manga;
|
||||||
private Source source;
|
private Source source;
|
||||||
private List<Chapter> chapters;
|
private List<Chapter> chapters;
|
||||||
@State boolean hasRequested;
|
@State boolean hasRequested;
|
||||||
|
|
Loading…
Reference in a new issue