kopia lustrzana https://github.com/ryukoposting/Signal-Android
Remove requireContext call from async runnable.
rodzic
b48d4f3ec2
commit
3a75d30732
|
@ -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(); });
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue