mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 04:28:35 +00:00
Remove requireContext call from async runnable.
This commit is contained in:
@@ -90,8 +90,10 @@ public abstract class MediaPreviewFragment extends Fragment {
|
|||||||
attachmentId = new PartUriParser(Objects.requireNonNull(requireArguments().getParcelable(DATA_URI))).getPartId();
|
attachmentId = new PartUriParser(Objects.requireNonNull(requireArguments().getParcelable(DATA_URI))).getPartId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Context context = requireContext().getApplicationContext();
|
||||||
|
|
||||||
SimpleTask.run(getViewLifecycleOwner().getLifecycle(),
|
SimpleTask.run(getViewLifecycleOwner().getLifecycle(),
|
||||||
() -> DatabaseFactory.getAttachmentDatabase(requireContext()).hasAttachment(attachmentId),
|
() -> DatabaseFactory.getAttachmentDatabase(context).hasAttachment(attachmentId),
|
||||||
hasAttachment -> { if (!hasAttachment) events.mediaNotAvailable(); });
|
hasAttachment -> { if (!hasAttachment) events.mediaNotAvailable(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user