Merge pull request #2464 from gouri-panda/Feature/gouri-panda/2463_progressBar_Doesn't_show

#2463 Progress Bar Fixed in VideoView
This commit is contained in:
Seán Mac Gillicuddy 2020-11-02 09:50:15 +00:00 committed by GitHub
commit 13c20d338b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,6 +67,7 @@ import java.io.File
private const val HIDE_TAB_SWITCHER_DELAY: Long = 300 private const val HIDE_TAB_SWITCHER_DELAY: Long = 300
class KiwixReaderFragment : CoreReaderFragment() { class KiwixReaderFragment : CoreReaderFragment() {
private var isFullScreenVideo: Boolean = false
override fun inject(baseActivity: BaseActivity) { override fun inject(baseActivity: BaseActivity) {
baseActivity.cachedComponent.inject(this) baseActivity.cachedComponent.inject(this)
@ -231,6 +232,9 @@ class KiwixReaderFragment : CoreReaderFragment() {
if (zimReaderContainer.zimFile == null) { if (zimReaderContainer.zimFile == null) {
exitBook() exitBook()
} }
if (isFullScreenVideo) {
hideNavBar()
}
} }
override fun restoreViewStateOnInvalidJSON() { override fun restoreViewStateOnInvalidJSON() {
@ -264,7 +268,8 @@ class KiwixReaderFragment : CoreReaderFragment() {
} }
override fun onFullscreenVideoToggled(isFullScreen: Boolean) { override fun onFullscreenVideoToggled(isFullScreen: Boolean) {
if (isFullScreen) { isFullScreenVideo = isFullScreen
if (isFullScreenVideo) {
hideNavBar() hideNavBar()
} else { } else {
showNavBar() showNavBar()