mirror of
https://git.mihon.tech/mihonapp/mihon
synced 2024-11-24 14:15:54 +03:00
No next chapter toast on play button
This commit is contained in:
parent
d7f5787ea0
commit
b737da62dd
1 changed files with 10 additions and 4 deletions
|
@ -16,6 +16,7 @@ import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -72,10 +73,15 @@ public class ChaptersFragment extends BaseRxFragment<ChaptersPresenter> implemen
|
||||||
setSwipeRefreshListener();
|
setSwipeRefreshListener();
|
||||||
|
|
||||||
readCb.setOnCheckedChangeListener((arg, isCheked) -> getPresenter().setReadFilter(isCheked));
|
readCb.setOnCheckedChangeListener((arg, isCheked) -> getPresenter().setReadFilter(isCheked));
|
||||||
sortBtn.setOnClickListener(v->getPresenter().revertSortOrder());
|
sortBtn.setOnClickListener(v -> getPresenter().revertSortOrder());
|
||||||
nextUnreadBtn.setOnClickListener(v->{
|
nextUnreadBtn.setOnClickListener(v -> {
|
||||||
|
Chapter chapter = getPresenter().getNextUnreadChapter();
|
||||||
|
if (chapter != null) {
|
||||||
getPresenter().onChapterClicked(getPresenter().getNextUnreadChapter());
|
getPresenter().onChapterClicked(getPresenter().getNextUnreadChapter());
|
||||||
startActivity(ReaderActivity.newIntent(getActivity()));
|
startActivity(ReaderActivity.newIntent(getActivity()));
|
||||||
|
} else {
|
||||||
|
Toast.makeText(getContext(), R.string.no_next_chapter, Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue