aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2016-06-19 20:51:56 +0200
committerChristian Schneppe <christian@pix-art.de>2016-06-19 20:51:56 +0200
commit0dc21f0494339513e2c774f26c57bd6498f0b09d (patch)
treef1477cd51d16cb1facb30ba480ebac6f1cf1c06a /src/main/java
parent1906ccb420a099b66c998a54e00cbf59f8c882f8 (diff)
optimized image cache
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ShowFullscreenMessageActivity.java2
-rw-r--r--src/main/java/eu/siacs/conversations/ui/XmppActivity.java3
2 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ShowFullscreenMessageActivity.java b/src/main/java/eu/siacs/conversations/ui/ShowFullscreenMessageActivity.java
index 4cabf0bb2..43791ec7f 100644
--- a/src/main/java/eu/siacs/conversations/ui/ShowFullscreenMessageActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ShowFullscreenMessageActivity.java
@@ -15,6 +15,7 @@ import android.widget.Toast;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.animation.GlideAnimation;
import com.bumptech.glide.request.target.BitmapImageViewTarget;
+import com.bumptech.glide.signature.StringSignature;
import com.github.rtoshiro.view.video.FullscreenVideoLayout;
import java.io.File;
@@ -85,6 +86,7 @@ public class ShowFullscreenMessageActivity extends Activity {
Glide.with(this)
.load(file)
.asBitmap()
+ .signature(new StringSignature(String.valueOf(System.currentTimeMillis())))
.into(new BitmapImageViewTarget(mImage) {
@Override
public void onResourceReady(Bitmap resource, GlideAnimation<? super Bitmap> glideAnimation) {
diff --git a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java
index eea0d7f32..c2ff47df4 100644
--- a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java
@@ -55,6 +55,7 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool;
import com.bumptech.glide.load.resource.bitmap.FileDescriptorBitmapDecoder;
import com.bumptech.glide.load.resource.bitmap.VideoBitmapDecoder;
+import com.bumptech.glide.signature.StringSignature;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.EncodeHintType;
import com.google.zxing.WriterException;
@@ -1220,6 +1221,7 @@ public abstract class XmppActivity extends Activity {
.fitCenter()
//.centerCrop()
.diskCacheStrategy(DiskCacheStrategy.RESULT)
+ .signature(new StringSignature(String.valueOf(System.currentTimeMillis())))
.into(imageView);
} catch (Exception e) {
e.printStackTrace();
@@ -1247,6 +1249,7 @@ public abstract class XmppActivity extends Activity {
//.centerCrop()
.diskCacheStrategy(DiskCacheStrategy.RESULT)
.videoDecoder(fileDescriptorBitmapDecoder)
+ .signature(new StringSignature(String.valueOf(System.currentTimeMillis())))
.into(imageView);
} catch (Exception e) {
e.printStackTrace();