Fix issue #990 #421 - Crash during transitions

This commit is contained in:
Thomas 2023-12-14 10:56:09 +01:00
parent 0982e1bb38
commit f0324038e3
3 changed files with 9 additions and 6 deletions

View file

@ -146,9 +146,9 @@ dependencies {
implementation "androidx.work:work-runtime:2.9.0"
implementation 'app.futured.hauler:hauler:5.0.0'
implementation "com.github.chrisbanes:PhotoView:2.3.0"
implementation "ch.acra:acra-mail:5.9.6"
implementation "ch.acra:acra-limiter:5.9.3"
implementation "ch.acra:acra-dialog:5.9.6"
implementation "ch.acra:acra-mail:5.11.3"
implementation "ch.acra:acra-limiter:5.11.3"
implementation "ch.acra:acra-dialog:5.11.3"
implementation "com.madgag.spongycastle:bctls-jdk15on:1.58.0.0"
implementation 'com.github.UnifiedPush:android-connector:2.2.0'
// implementation 'com.github.UnifiedPush:android-foss_embedded_fcm_distributor:1.0.0-beta1'

View file

@ -253,7 +253,9 @@ public class MediaActivity extends BaseTransparentActivity implements OnDownload
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) {
finish();
ActivityCompat.finishAfterTransition(MediaActivity.this);
try {
ActivityCompat.finishAfterTransition(MediaActivity.this);
}catch (Exception ignored){}
return true;
} else if (item.getItemId() == R.id.action_save) {
int position = binding.mediaViewpager.getCurrentItem();

View file

@ -361,9 +361,10 @@ public class FragmentMedia extends Fragment {
if (percent < 0.70) {
binding.videoViewContainer.setVisibility(View.GONE);
binding.videoLayout.setVisibility(View.GONE);
ActivityCompat.finishAfterTransition(requireActivity());
try {
ActivityCompat.finishAfterTransition(requireActivity());
}catch (Exception ignored){}
}
}
@Override