Skip to content

Commit

Permalink
Add JvmStatic annotation to singleton instance in ImageManager
Browse files Browse the repository at this point in the history
  • Loading branch information
malinajirka committed Jul 12, 2018
1 parent 4403677 commit 2129142
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public void loadThumbnails(long blogId, long postId, boolean isPrivate) {
mView.addView(view);

String photonUrl = PhotonUtils.getPhotonImageUrl(imageUrl, mThumbnailWidth, mThumbnailHeight);
ImageManager.Companion.getInstance().load(imageView, ImageType.PHOTO, photonUrl, ScaleType.CENTER_CROP);
ImageManager.getInstance().load(imageView, ImageType.PHOTO, photonUrl, ScaleType.CENTER_CROP);

// tapping a thumbnail opens the photo viewer
imageView.setOnClickListener(new OnClickListener() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class ImageManager @Inject constructor(val placeholderManager: ImagePlaceholderM

@Deprecated("Object for backward compatibility with code which doesn't support DI")
companion object {
@JvmStatic
@Deprecated("Use injected ImageManager")
val instance: ImageManager by lazy { ImageManager(ImagePlaceholderManager()) }
}
Expand Down

0 comments on commit 2129142

Please sign in to comment.