We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33dd82d commit 8b0278bCopy full SHA for 8b0278b
app/src/main/java/com/github/mobile/util/AvatarLoader.java
@@ -165,10 +165,11 @@ private String getAvatarFilenameForUrl(String avatarUrl) {
165
protected BitmapDrawable fetchAvatar(final String url,
166
final String userId, final String cachedAvatarFilename) {
167
File userAvatarDir = new File(avatarDir, userId);
168
- if (!userAvatarDir.isDirectory())
169
- userAvatarDir.mkdirs();
170
- else
+ if (userAvatarDir.isDirectory())
171
deleteCachedUserAvatars(userAvatarDir);
+ else
+ userAvatarDir.delete();
172
+ userAvatarDir.mkdirs();
173
174
File rawAvatar = new File(userAvatarDir, cachedAvatarFilename + "-raw");
175
HttpRequest request = HttpRequest.get(url);
0 commit comments