* 1/10000 chance for the donation reminder to popup
This commit is contained in:
parent
2ed4df6ed5
commit
a56c8bbc66
|
@ -32,6 +32,7 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Properties;
|
||||
import java.util.Random;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
@ -225,7 +226,7 @@ public class Main {
|
|||
int donateStep = 10000;
|
||||
int usage = history.totalSize();
|
||||
|
||||
if (usage / donateStep > donateLv) {
|
||||
if (usage / donateStep > donateLv || new Random().nextInt(donateStep) == 777) {
|
||||
persistentDonateLv.setValue(String.valueOf(Math.max(donateLv + 1, usage / donateStep)));
|
||||
|
||||
String message = String.format(Locale.ROOT, "<html><p style='font-size:16pt; font-weight:bold'>Thank you for using FileBot!</p><br><p>It has taken many nights to develop this application. If you enjoy using it,<br>please consider a donation to the author of this software. It will help to<br>make FileBot even better!<p><p style='font-size:14pt; font-weight:bold'>You've renamed %,d files.</p><br><html>", history.totalSize());
|
||||
|
|
Loading…
Reference in New Issue