mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-18 10:13:55 +00:00
fix: dismiss after extractors loaded
This commit is contained in:
@@ -181,22 +181,28 @@ class SelectorDialogFragment : BottomSheetDialogFragment() {
|
||||
model.loadEpisodeVideos(ep, media!!.selected!!.sourceIndex)
|
||||
withContext(Dispatchers.Main) {
|
||||
binding.selectorProgressBar.visibility = View.GONE
|
||||
if (adapter.itemCount == 0) {
|
||||
snackString(getString(R.string.stream_selection_empty))
|
||||
tryWith {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
media!!.anime?.episodes?.set(media!!.anime?.selectedEpisode!!, ep)
|
||||
adapter.addAll(ep.extractors)
|
||||
if (ep.extractors?.size == 0) {
|
||||
snackString(getString(R.string.stream_selection_empty))
|
||||
tryWith {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
if (model.watchSources!!.isDownloadedSource(media?.selected!!.sourceIndex)) {
|
||||
adapter.performClick(0)
|
||||
}
|
||||
binding.selectorProgressBar.visibility = View.GONE
|
||||
}
|
||||
if (adapter.itemCount == 0) {
|
||||
snackString(getString(R.string.stream_selection_empty))
|
||||
tryWith {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user