Refactor SupportDialog

This commit is contained in:
Reinhard Pointner 2016-05-02 07:48:58 +08:00
parent b3fc605f1f
commit cfe2d55c64
1 changed files with 12 additions and 6 deletions

View File

@ -22,8 +22,11 @@ public enum SupportDialog {
} }
@Override @Override
String[] getActions() { String[] getActions(boolean first) {
return new String[] { "Donate! :)", "Maybe next time." }; if (first)
return new String[] { "Donate! :)", "Nope! Maybe next time." };
else
return new String[] { "Donate again! :)", "Nope! Not this time." };
} }
@Override @Override
@ -51,8 +54,11 @@ public enum SupportDialog {
} }
@Override @Override
String[] getActions() { String[] getActions(boolean first) {
return new String[] { "Review! I like FileBot. :)", "Nope! Maybe next time." }; if (first)
return new String[] { "Write a Review! :)", "Nope! Maybe next time." };
else
return new String[] { "Update my Review! :)", "Nope! Not this time." };
} }
@Override @Override
@ -82,7 +88,7 @@ public enum SupportDialog {
} }
String message = getMessage(renameCount); String message = getMessage(renameCount);
String[] actions = getActions(); String[] actions = getActions(supportRev <= 0);
JOptionPane pane = new JOptionPane(message, INFORMATION_MESSAGE, YES_NO_OPTION, getIcon(), actions, actions[0]); JOptionPane pane = new JOptionPane(message, INFORMATION_MESSAGE, YES_NO_OPTION, getIcon(), actions, actions[0]);
pane.createDialog(null, getTitle()).setVisible(true); pane.createDialog(null, getTitle()).setVisible(true);
@ -97,7 +103,7 @@ public enum SupportDialog {
abstract String getMessage(int renameCount); abstract String getMessage(int renameCount);
abstract String[] getActions(); abstract String[] getActions(boolean first);
abstract Icon getIcon(); abstract Icon getIcon();