mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-09-20 08:45:50 +01:00
Fix media preview crash when state emits after the image view is destroyed.
This commit is contained in:
+3
-1
@@ -59,7 +59,9 @@ public final class ImageMediaPreviewPageFragment extends MediaPreviewPageFragmen
|
||||
zoomingImageView.setOnLongClickListener(v -> events.singleTapOnMedia());
|
||||
|
||||
lifecycleDisposable.add(viewModel.getState().distinctUntilChanged().subscribe(state -> {
|
||||
zoomingImageView.setAlpha(state.isInSharedAnimation() ? 0f : 1f);
|
||||
if (zoomingImageView != null) {
|
||||
zoomingImageView.setAlpha(state.isInSharedAnimation() ? 0f : 1f);
|
||||
}
|
||||
}));
|
||||
|
||||
return view;
|
||||
|
||||
Reference in New Issue
Block a user