Android: Update Picasso lib to latest version

This commit is contained in:
mahdihijazi 2018-10-27 16:05:09 +02:00
parent 0140009114
commit 1da69811b8
3 changed files with 10 additions and 10 deletions

View File

@ -96,7 +96,7 @@ dependencies {
implementation 'de.hdodenhof:circleimageview:2.1.0'
// For loading huge screenshots from the disk.
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.squareup.picasso:picasso:2.71828'
// Allows FRP-style asynchronous operations in Android.
implementation 'io.reactivex:rxandroid:1.2.1'

View File

@ -67,7 +67,7 @@ public final class GameDetailsDialog extends DialogFragment
});
// Fill in the view contents.
Picasso.with(imageGameScreen.getContext())
Picasso.get()
.load(getArguments().getString(gameFile.getScreenshotPath()))
.fit()
.centerCrop()

View File

@ -19,7 +19,7 @@ public class PicassoUtils
File cover = new File(gameFile.getCustomCoverPath());
if (cover.exists())
{
Picasso.with(imageView.getContext())
Picasso.get()
.load(cover)
.noFade()
.noPlaceholder()
@ -31,7 +31,7 @@ public class PicassoUtils
}
else if ((cover = new File(gameFile.getCoverPath())).exists())
{
Picasso.with(imageView.getContext())
Picasso.get()
.load(cover)
.noFade()
.noPlaceholder()
@ -47,7 +47,7 @@ public class PicassoUtils
*/
else
{
Picasso.with(imageView.getContext())
Picasso.get()
.load(CoverHelper.buildGameTDBUrl(gameFile, CoverHelper.getRegion(gameFile)))
.noFade()
.noPlaceholder()
@ -65,9 +65,9 @@ public class PicassoUtils
}
@Override
public void onError() // Second pass using US region
public void onError(Exception ex) // Second pass using US region
{
Picasso.with(imageView.getContext())
Picasso.get()
.load(CoverHelper.buildGameTDBUrl(gameFile, "US"))
.fit()
.noFade()
@ -87,9 +87,9 @@ public class PicassoUtils
}
@Override
public void onError() // Third and last pass using EN region
public void onError(Exception ex) // Third and last pass using EN region
{
Picasso.with(imageView.getContext())
Picasso.get()
.load(CoverHelper.buildGameTDBUrl(gameFile, "EN"))
.fit()
.noFade()
@ -110,7 +110,7 @@ public class PicassoUtils
}
@Override
public void onError()
public void onError(Exception ex)
{
}
});