Skip to content

Commit 39e24b1

Browse files
committed
Don't put local URI into thumbnail cache.
1 parent 5fc684f commit 39e24b1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/src/main/java/fr/free/nrw/commons/MediaWikiImageView.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,10 @@ protected void onPostExecute(String result) {
6464
}
6565
if (TextUtils.isEmpty(result) && media.getLocalUri() != null) {
6666
result = media.getLocalUri().toString();
67+
} else {
68+
// only cache meaningful thumbnails received from network.
69+
CommonsApplication.getInstance().getThumbnailUrlCache().put(media.getFilename(), result);
6770
}
68-
CommonsApplication.getInstance().getThumbnailUrlCache().put(media.getFilename(), result);
6971
setImageUrl(result);
7072
}
7173
}

0 commit comments

Comments
 (0)