mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-22 20:18:36 +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();
|
||||
}
|
||||
|
||||
final Context context = requireContext().getApplicationContext();
|
||||
|
||||
SimpleTask.run(getViewLifecycleOwner().getLifecycle(),
|
||||
() -> DatabaseFactory.getAttachmentDatabase(requireContext()).hasAttachment(attachmentId),
|
||||
() -> DatabaseFactory.getAttachmentDatabase(context).hasAttachment(attachmentId),
|
||||
hasAttachment -> { if (!hasAttachment) events.mediaNotAvailable(); });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user