diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fe4c6eb5..8ac6fe083 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ Release Notes ============= +Version 6.6.4 +------------- + * Bug fixes + Version 6.6.3 ------------- * Possible fix for inability to sign in diff --git a/app/build.gradle b/app/build.gradle index 1a997c444..874eea8aa 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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' diff --git a/app/src/main/java/com/boardgamegeek/ui/GamePlayStatsFragment.java b/app/src/main/java/com/boardgamegeek/ui/GamePlayStatsFragment.java index 9017a1b38..d318d5a8d 100644 --- a/app/src/main/java/com/boardgamegeek/ui/GamePlayStatsFragment.java +++ b/app/src/main/java/com/boardgamegeek/ui/GamePlayStatsFragment.java @@ -1009,7 +1009,7 @@ public int getHIndexOffset() { if (playCount >= hIndex) { return -1; } else { - return hIndex - playCount + 1; + return hIndex - playCount; } } diff --git a/app/src/main/java/com/boardgamegeek/util/LargeIconLoader.java b/app/src/main/java/com/boardgamegeek/util/LargeIconLoader.java index 394776be0..251a72a2d 100644 --- a/app/src/main/java/com/boardgamegeek/util/LargeIconLoader.java +++ b/app/src/main/java/com/boardgamegeek/util/LargeIconLoader.java @@ -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; @@ -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)) { @@ -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); } @@ -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