Fix a crash with media

custom_intent
Thomas 11 months ago
parent fcc323af2a
commit 36e258adb3

@ -110,9 +110,13 @@ public class FragmentMedia extends Fragment {
enableSliding(true);
}
});
binding.mediaPicture.setOnClickListener(v -> ((MediaActivity) requireActivity()).toogleFullScreen());
binding.mediaPicture.setOnClickListener(v -> {
if(isAdded()){((MediaActivity) requireActivity()).toogleFullScreen();}
});
binding.mediaVideo.setOnClickListener(v -> ((MediaActivity) requireActivity()).toogleFullScreen());
binding.mediaVideo.setOnClickListener(v -> {
if(isAdded()) {((MediaActivity) requireActivity()).toogleFullScreen();}
});
String type = attachment.type;
String preview_url = attachment.preview_url;

Loading…
Cancel
Save