public Drawable getDrawable() { if (downloadFile.exists()) { return AttachedImageDrawable.drawableFromPath(this, downloadFile.getFile().getAbsolutePath()); } AvatarData.asyncRequestDownload(userId); return getDefaultDrawable(); }
@NonNull public Drawable getDrawable() { Drawable drawable = MyImageCache.getAvatarDrawable(this, downloadFile.getFilePath()); if (drawable == MyDrawableCache.BROKEN) { return getDefaultDrawable(); } else if (drawable != null) { return drawable; } if (!downloadFile.exists()) { AvatarData.asyncRequestDownload(userId); } return getDefaultDrawable(); }