recheck extended details if some fields changed
This commit is contained in:
parent
d78068d697
commit
bb9b194d2c
|
@ -44,6 +44,7 @@ class PhotoFragment : ViewPagerFragment() {
|
|||
private var isFragmentVisible = false
|
||||
private var wasInit = false
|
||||
private var storedShowExtendedDetails = false
|
||||
private var storedExtendedDetails = 0
|
||||
|
||||
lateinit var view: ViewGroup
|
||||
lateinit var medium: Medium
|
||||
|
@ -111,11 +112,12 @@ class PhotoFragment : ViewPagerFragment() {
|
|||
override fun onPause() {
|
||||
super.onPause()
|
||||
storedShowExtendedDetails = context.config.showExtendedDetails
|
||||
storedExtendedDetails = context.config.extendedDetails
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
if (wasInit && context.config.showExtendedDetails != storedShowExtendedDetails) {
|
||||
if (wasInit && (context.config.showExtendedDetails != storedShowExtendedDetails || context.config.extendedDetails != storedExtendedDetails)) {
|
||||
checkExtendedDetails()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
private var mIsFragmentVisible = false
|
||||
private var mPlayOnPrepare = false
|
||||
private var mStoredShowExtendedDetails = false
|
||||
private var mStoredExtendedDetails = 0
|
||||
private var mCurrTime = 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_brightness_controller.beVisibleIf(context.config.allowVideoGestures)
|
||||
|
||||
if (context.config.showExtendedDetails != mStoredShowExtendedDetails) {
|
||||
if (context.config.showExtendedDetails != mStoredShowExtendedDetails || context.config.extendedDetails != mStoredExtendedDetails) {
|
||||
checkExtendedDetails()
|
||||
}
|
||||
}
|
||||
|
@ -98,6 +99,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
pauseVideo()
|
||||
mIsFragmentVisible = false
|
||||
mStoredShowExtendedDetails = context.config.showExtendedDetails
|
||||
mStoredExtendedDetails = context.config.extendedDetails
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
|
Loading…
Reference in New Issue