mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
make sure the video fragment still exists when the video completes
This commit is contained in:
@@ -464,6 +464,10 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun videoCompleted() {
|
private fun videoCompleted() {
|
||||||
|
if (!isAdded) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (listener?.videoEnded() == false && context.config.loopVideos) {
|
if (listener?.videoEnded() == false && context.config.loopVideos) {
|
||||||
playVideo()
|
playVideo()
|
||||||
} else {
|
} else {
|
||||||
|
@@ -20,8 +20,9 @@ abstract class ViewPagerFragment : Fragment() {
|
|||||||
|
|
||||||
fun getMediumExtendedDetails(medium: Medium): String {
|
fun getMediumExtendedDetails(medium: Medium): String {
|
||||||
val file = File(medium.path)
|
val file = File(medium.path)
|
||||||
if (!file.exists())
|
if (!file.exists()) {
|
||||||
return ""
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
val path = "${file.parent.trimEnd('/')}/"
|
val path = "${file.parent.trimEnd('/')}/"
|
||||||
val exif = android.media.ExifInterface(medium.path)
|
val exif = android.media.ExifInterface(medium.path)
|
||||||
|
Reference in New Issue
Block a user