mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
feat: show the episodic range with current selection checked (#851)
This commit is contained in:
parent
5e6272be3f
commit
6f1e0bef80
1 changed files with 9 additions and 3 deletions
|
@ -247,6 +247,7 @@ open class ResultFragmentPhone : FullScreenPlayer() {
|
|||
}
|
||||
|
||||
var selectSeason: String? = null
|
||||
var selectEpisodeRange: String? = null
|
||||
|
||||
private fun setUrl(url: String?) {
|
||||
if (url == null) {
|
||||
|
@ -1027,6 +1028,8 @@ open class ResultFragmentPhone : FullScreenPlayer() {
|
|||
observeNullable(viewModel.selectedRange) { range ->
|
||||
resultBinding?.apply {
|
||||
resultEpisodeSelect.setText(range)
|
||||
|
||||
selectEpisodeRange = range?.asStringNull(resultEpisodeSelect.context)
|
||||
// If Season button is invisible then the bookmark button next focus is episode select
|
||||
if (resultEpisodeSelect.isVisible && !resultSeasonButton.isVisible && resultResumeParent.isVisible) {
|
||||
setFocusUpAndDown(resultResumeSeriesButton, resultEpisodeSelect)
|
||||
|
@ -1060,9 +1063,12 @@ open class ResultFragmentPhone : FullScreenPlayer() {
|
|||
r to (text?.asStringNull(ctx) ?: return@mapNotNull null)
|
||||
}
|
||||
|
||||
view.popupMenuNoIconsAndNoStringRes(names.mapIndexed { index, (_, name) ->
|
||||
index to name
|
||||
}) {
|
||||
activity?.showDialog(
|
||||
names.map { it.second },
|
||||
names.indexOfFirst { it.second == selectEpisodeRange },
|
||||
"",
|
||||
false,
|
||||
{}) { itemId ->
|
||||
viewModel.changeRange(names[itemId].first)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue