mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-10 04:37:25 +01:00
Merge pull request #7 from icanit/master
No next chapter toast on play button
This commit is contained in:
commit
d0589b72fd
@ -16,6 +16,7 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -72,10 +73,15 @@ public class ChaptersFragment extends BaseRxFragment<ChaptersPresenter> implemen
|
||||
setSwipeRefreshListener();
|
||||
|
||||
readCb.setOnCheckedChangeListener((arg, isCheked) -> getPresenter().setReadFilter(isCheked));
|
||||
sortBtn.setOnClickListener(v->getPresenter().revertSortOrder());
|
||||
nextUnreadBtn.setOnClickListener(v->{
|
||||
sortBtn.setOnClickListener(v -> getPresenter().revertSortOrder());
|
||||
nextUnreadBtn.setOnClickListener(v -> {
|
||||
Chapter chapter = getPresenter().getNextUnreadChapter();
|
||||
if (chapter != null) {
|
||||
getPresenter().onChapterClicked(getPresenter().getNextUnreadChapter());
|
||||
startActivity(ReaderActivity.newIntent(getActivity()));
|
||||
} else {
|
||||
Toast.makeText(getContext(), R.string.no_next_chapter, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
return view;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user