From 46821b7ddbd3d7af245aeee8bd98dca18c579dc6 Mon Sep 17 00:00:00 2001 From: stom79 Date: Tue, 28 Nov 2017 06:54:52 +0100 Subject: [PATCH] Fixes cache issue --- .../java/fr/gouv/etalab/mastodon/client/HttpsConnection.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/client/HttpsConnection.java b/app/src/main/java/fr/gouv/etalab/mastodon/client/HttpsConnection.java index 96d506819..d986339a1 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/client/HttpsConnection.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/client/HttpsConnection.java @@ -297,7 +297,8 @@ public class HttpsConnection { cal.setTime(new Date()); cal.add(Calendar.DATE, -1); Date dateBefore = cal.getTime(); - if( date.after(dateBefore)){ + File file = new File(uri); + if( date.after(dateBefore) && file.exists()){ imageLoader.displayImage(uri, imageView, options); return; }