v0.9.4: added some missed 0.9.4 code to open source

This commit is contained in:
Evan Debenham
2021-08-08 20:25:10 -04:00
parent 4b6f487f1b
commit 6ac5369db4
7 changed files with 35 additions and 1 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 404 B

After

Width:  |  Height:  |  Size: 404 B

@@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
import com.shatteredpixel.shatteredpixeldungeon.scenes.TitleScene;
import com.shatteredpixel.shatteredpixeldungeon.scenes.WelcomeScene;
import com.watabou.noosa.Game;
import com.watabou.noosa.audio.Music;
@@ -102,6 +102,10 @@ public class Updates {
}
}
public static boolean supportsReviews() {
return supportsUpdates() && service.supportsReviews();
}
public static void launchReview(Callback callback){
if (supportsUpdates()){
service.initializeReview(new UpdateService.ReviewResultCallback() {
@@ -115,4 +119,10 @@ public class Updates {
}
}
public static void openReviewURI(){
if (supportsUpdates()){
service.openReviewURI();
}
}
}
@@ -551,7 +551,7 @@ public class WndSettings extends WndTabbed {
chkNews.checked(SPDSettings.news());
add(chkNews);
if (Updates.supportsUpdates()) {
if (Updates.supportsUpdates() && Updates.isUpdateable()) {
chkUpdates = new CheckBox(Messages.get(this, "updates")) {
@Override
protected void onClick() {