mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 09:49:30 +01:00
Remove thumbnails from the AttachmentDatabase.
Glide can do everything for us now, including video thumbnails.
This commit is contained in:
@@ -29,7 +29,7 @@ public abstract class MediaPreviewFragment extends Fragment {
|
||||
protected Events events;
|
||||
|
||||
public static MediaPreviewFragment newInstance(@NonNull Attachment attachment, boolean autoPlay) {
|
||||
return newInstance(attachment.getDataUri(), attachment.getContentType(), attachment.getSize(), autoPlay);
|
||||
return newInstance(attachment.getUri(), attachment.getContentType(), attachment.getSize(), autoPlay);
|
||||
}
|
||||
|
||||
public static MediaPreviewFragment newInstance(@NonNull Uri dataUri, @NonNull String contentType, long size, boolean autoPlay) {
|
||||
|
||||
@@ -98,8 +98,7 @@ public class MediaPreviewViewModel extends ViewModel {
|
||||
}
|
||||
|
||||
private @Nullable Media toMedia(@NonNull MediaRecord mediaRecord) {
|
||||
Uri uri = mediaRecord.getAttachment().getThumbnailUri() != null ? mediaRecord.getAttachment().getThumbnailUri()
|
||||
: mediaRecord.getAttachment().getDataUri();
|
||||
Uri uri = mediaRecord.getAttachment().getUri();
|
||||
|
||||
if (uri == null) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user