diff --git a/Atarashii/src/net/somethingdreadful/MAL/Theme.java b/Atarashii/src/net/somethingdreadful/MAL/Theme.java index 1039ecdb..c94b285c 100644 --- a/Atarashii/src/net/somethingdreadful/MAL/Theme.java +++ b/Atarashii/src/net/somethingdreadful/MAL/Theme.java @@ -12,11 +12,12 @@ import com.nispok.snackbar.Snackbar; import com.nispok.snackbar.SnackbarManager; -import io.fabric.sdk.android.Fabric; import net.somethingdreadful.MAL.account.AccountService; import java.util.Locale; +import io.fabric.sdk.android.Fabric; + public class Theme extends Application { public static boolean darkTheme; @@ -150,7 +151,7 @@ else if (score <= 60) Double score5 = Math.floor(score / 10); return score5 > 0.0 ? String.format("%.1f", score5) : "?"; default: - return String.format("%.0f", Math.floor(score / 10)); + return "?"; } } diff --git a/Atarashii/src/net/somethingdreadful/MAL/dialog/NumberPickerDialogFragment.java b/Atarashii/src/net/somethingdreadful/MAL/dialog/NumberPickerDialogFragment.java index 8f61a2ff..8686f578 100644 --- a/Atarashii/src/net/somethingdreadful/MAL/dialog/NumberPickerDialogFragment.java +++ b/Atarashii/src/net/somethingdreadful/MAL/dialog/NumberPickerDialogFragment.java @@ -19,7 +19,6 @@ import net.somethingdreadful.MAL.account.AccountService; public class NumberPickerDialogFragment extends DialogFragment { - NumberPicker numberPicker; EditText numberInput; private onUpdateClickListener callback; @@ -36,10 +35,12 @@ private View makeNumberPicker() { if (!inputScore) { numberPicker.setMaxValue(max != 0 ? max : 999); numberPicker.setMinValue(0); - if (!AccountService.isMAL() && isRating()) - numberPicker.setValue(Integer.parseInt(Theme.getDisplayScore(current))); - else + if (!AccountService.isMAL() && isRating()) { + String score = Theme.getDisplayScore(current); + numberPicker.setValue(score.equals("?") ? 0 : Integer.parseInt(score)); + } else { numberPicker.setValue(current); + } numberInput.setVisibility(View.GONE); } else { numberInput.setText(Theme.getDisplayScore(current));