recheck extended details if some fields changed
This commit is contained in:
parent
d78068d697
commit
bb9b194d2c
2 changed files with 6 additions and 2 deletions
|
@ -44,6 +44,7 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
private var isFragmentVisible = false
|
private var isFragmentVisible = false
|
||||||
private var wasInit = false
|
private var wasInit = false
|
||||||
private var storedShowExtendedDetails = false
|
private var storedShowExtendedDetails = false
|
||||||
|
private var storedExtendedDetails = 0
|
||||||
|
|
||||||
lateinit var view: ViewGroup
|
lateinit var view: ViewGroup
|
||||||
lateinit var medium: Medium
|
lateinit var medium: Medium
|
||||||
|
@ -111,11 +112,12 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
super.onPause()
|
super.onPause()
|
||||||
storedShowExtendedDetails = context.config.showExtendedDetails
|
storedShowExtendedDetails = context.config.showExtendedDetails
|
||||||
|
storedExtendedDetails = context.config.extendedDetails
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
if (wasInit && context.config.showExtendedDetails != storedShowExtendedDetails) {
|
if (wasInit && (context.config.showExtendedDetails != storedShowExtendedDetails || context.config.extendedDetails != storedExtendedDetails)) {
|
||||||
checkExtendedDetails()
|
checkExtendedDetails()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
private var mIsFragmentVisible = false
|
private var mIsFragmentVisible = false
|
||||||
private var mPlayOnPrepare = false
|
private var mPlayOnPrepare = false
|
||||||
private var mStoredShowExtendedDetails = false
|
private var mStoredShowExtendedDetails = false
|
||||||
|
private var mStoredExtendedDetails = 0
|
||||||
private var mCurrTime = 0
|
private var mCurrTime = 0
|
||||||
private var mDuration = 0
|
private var mDuration = 0
|
||||||
|
|
||||||
|
@ -88,7 +89,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
mView.video_volume_controller.beVisibleIf(context.config.allowVideoGestures)
|
mView.video_volume_controller.beVisibleIf(context.config.allowVideoGestures)
|
||||||
mView.video_brightness_controller.beVisibleIf(context.config.allowVideoGestures)
|
mView.video_brightness_controller.beVisibleIf(context.config.allowVideoGestures)
|
||||||
|
|
||||||
if (context.config.showExtendedDetails != mStoredShowExtendedDetails) {
|
if (context.config.showExtendedDetails != mStoredShowExtendedDetails || context.config.extendedDetails != mStoredExtendedDetails) {
|
||||||
checkExtendedDetails()
|
checkExtendedDetails()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -98,6 +99,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
pauseVideo()
|
pauseVideo()
|
||||||
mIsFragmentVisible = false
|
mIsFragmentVisible = false
|
||||||
mStoredShowExtendedDetails = context.config.showExtendedDetails
|
mStoredShowExtendedDetails = context.config.showExtendedDetails
|
||||||
|
mStoredExtendedDetails = context.config.extendedDetails
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
|
|
Loading…
Reference in a new issue