mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +01:00
make sure the video fragment still exists when the video completes
This commit is contained in:
parent
883e3ad6c1
commit
75c9d28547
2 changed files with 6 additions and 1 deletions
|
@ -464,6 +464,10 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
}
|
||||
|
||||
private fun videoCompleted() {
|
||||
if (!isAdded) {
|
||||
return
|
||||
}
|
||||
|
||||
if (listener?.videoEnded() == false && context.config.loopVideos) {
|
||||
playVideo()
|
||||
} else {
|
||||
|
|
|
@ -20,8 +20,9 @@ abstract class ViewPagerFragment : Fragment() {
|
|||
|
||||
fun getMediumExtendedDetails(medium: Medium): String {
|
||||
val file = File(medium.path)
|
||||
if (!file.exists())
|
||||
if (!file.exists()) {
|
||||
return ""
|
||||
}
|
||||
|
||||
val path = "${file.parent.trimEnd('/')}/"
|
||||
val exif = android.media.ExifInterface(medium.path)
|
||||
|
|
Loading…
Reference in a new issue