Update feelingLucky

This commit is contained in:
Reinhard Pointner 2017-02-21 18:19:11 +08:00
parent f595e7247b
commit a10beebe68

View File

@ -86,14 +86,13 @@ public enum SupportDialog {
}; };
public boolean feelingLucky(int sessionRenameCount, int totalRenameCount, int currentRevision, int lastSupportRevision, int supportRevisionCount) { public boolean feelingLucky(int sessionRenameCount, int totalRenameCount, int currentRevision, int lastSupportRevision, int supportRevisionCount) {
if (isAppStore()) {
// ask for reviews at most once per revision // ask for reviews at most once per revision
if (currentRevision <= lastSupportRevision) { if (isAppStore() && currentRevision <= lastSupportRevision) {
return false; return false;
} }
// ask for reviews only when a significant number of files have been processed // ask for reviews only when a significant number of files have been processed
if (sessionRenameCount <= 10 || totalRenameCount <= 5000) { if (isAppStore() && sessionRenameCount <= 10 || totalRenameCount <= 5000) {
return false; return false;
} }
@ -101,7 +100,6 @@ public enum SupportDialog {
if (Math.random() <= 0.777) { if (Math.random() <= 0.777) {
return false; return false;
} }
}
// lucky if many files are processed in a single session // lucky if many files are processed in a single session
if (sessionRenameCount >= 2000 * Math.pow(2, supportRevisionCount)) { if (sessionRenameCount >= 2000 * Math.pow(2, supportRevisionCount)) {