mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-14 16:45:06 +01:00
Merge remote-tracking branch 'inorichi/master'
This commit is contained in:
commit
e5e3fa5e0b
@ -77,8 +77,7 @@ public class ChaptersFragment extends BaseRxFragment<ChaptersPresenter> implemen
|
||||
nextUnreadBtn.setOnClickListener(v -> {
|
||||
Chapter chapter = getPresenter().getNextUnreadChapter();
|
||||
if (chapter != null) {
|
||||
getPresenter().onChapterClicked(getPresenter().getNextUnreadChapter());
|
||||
startActivity(ReaderActivity.newIntent(getActivity()));
|
||||
openChapter(chapter);
|
||||
} else {
|
||||
Toast.makeText(getContext(), R.string.no_next_chapter, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@ -131,6 +130,12 @@ public class ChaptersFragment extends BaseRxFragment<ChaptersPresenter> implemen
|
||||
return ((MangaActivity) getActivity()).isOnlineManga();
|
||||
}
|
||||
|
||||
protected void openChapter(Chapter chapter) {
|
||||
getPresenter().onChapterClicked(chapter);
|
||||
Intent intent = ReaderActivity.newIntent(getActivity());
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
|
||||
mode.getMenuInflater().inflate(R.menu.chapter_selection, menu);
|
||||
@ -213,9 +218,7 @@ public class ChaptersFragment extends BaseRxFragment<ChaptersPresenter> implemen
|
||||
toggleSelection(position);
|
||||
return true;
|
||||
} else {
|
||||
getPresenter().onChapterClicked(adapter.getItem(position));
|
||||
Intent intent = ReaderActivity.newIntent(getActivity());
|
||||
startActivity(intent);
|
||||
openChapter(adapter.getItem(position));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user