mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-25 12:48:33 +00:00
Giphy integration
// FREEBIE
This commit is contained in:
@@ -10,6 +10,7 @@ import android.support.annotation.Nullable;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.mms.ContactPhotoUriLoader.ContactPhotoUri;
|
||||
@@ -52,6 +53,7 @@ public class ContactPhotoFactory {
|
||||
try {
|
||||
Bitmap bitmap = Glide.with(context)
|
||||
.load(new ContactPhotoUri(uri)).asBitmap()
|
||||
.diskCacheStrategy(DiskCacheStrategy.NONE)
|
||||
.centerCrop().into(targetSize, targetSize).get();
|
||||
return new BitmapContactPhoto(bitmap);
|
||||
} catch (ExecutionException e) {
|
||||
|
||||
Reference in New Issue
Block a user