Skip to content

Commit

Permalink
Merge branch 'hotfix/6.6.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
ccomeaux committed Jun 15, 2018
2 parents 9d90061 + 507293e commit 94651ff
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Release Notes
=============

Version 6.6.4
-------------
* Bug fixes

Version 6.6.3
-------------
* Possible fix for inability to sign in
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ buildscript {

def versionMajor = 6
def versionMinor = 6
def versionPatch = 3
def versionBuild = 2
def versionPatch = 4
def versionBuild = 1

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ public int getHIndexOffset() {
if (playCount >= hIndex) {
return -1;
} else {
return hIndex - playCount + 1;
return hIndex - playCount;
}
}

Expand Down
15 changes: 11 additions & 4 deletions app/src/main/java/com/boardgamegeek/util/LargeIconLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.support.annotation.MainThread;
import android.support.annotation.WorkerThread;
import android.text.TextUtils;

import com.squareup.picasso.Picasso;
Expand Down Expand Up @@ -33,9 +35,11 @@ public LargeIconLoader(Context context, String imageUrl, String thumbnailUrl, St
imageUrls.add(imageUrl);
}

@WorkerThread
public void executeInBackground() {
if (imageUrls.size() == 0) {
if (callback != null) callback.onFailedIconLoad();
return;
}
currentImageUrl = imageUrls.poll();
if (TextUtils.isEmpty(currentImageUrl)) {
Expand All @@ -51,12 +55,15 @@ public void executeInBackground() {
}
}

@MainThread
public void executeOnMainThread() {
if (imageUrls.size() == 0) {
if (callback != null) callback.onFailedIconLoad();
return;
}
currentImageUrl = imageUrls.poll();
if (TextUtils.isEmpty(currentImageUrl)) {
if (callback != null) {
callback.onFailedIconLoad();
}
executeOnMainThread();
} else {
getRequestCreator().into(this);
}
Expand All @@ -78,7 +85,7 @@ public void onBitmapLoaded(Bitmap bitmap, LoadedFrom from) {
@Override
public void onBitmapFailed(Drawable errorDrawable) {
Timber.i("Didn't find an image at %s", currentImageUrl);
executeOnMainThread();
if (callback != null) callback.onFailedIconLoad();
}

@Override
Expand Down

0 comments on commit 94651ff

Please sign in to comment.