diff --git a/app/src/main/java/eu/faircode/email/FragmentPro.java b/app/src/main/java/eu/faircode/email/FragmentPro.java index 6ee64c051c..49b711fdab 100644 --- a/app/src/main/java/eu/faircode/email/FragmentPro.java +++ b/app/src/main/java/eu/faircode/email/FragmentPro.java @@ -91,14 +91,14 @@ public class FragmentPro extends FragmentBase implements SharedPreferences.OnSha public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { prefs.edit().putBoolean("banner", !isChecked).apply(); - Intent daily = new Intent(getContext(), ServiceUI.class); - daily.setAction("daily"); - PendingIntent pi = PendingIntent.getService(getContext(), ServiceUI.PI_DAILY, daily, PendingIntent.FLAG_UPDATE_CURRENT); + Intent banner = new Intent(getContext(), ServiceUI.class); + banner.setAction("banner"); + PendingIntent pi = PendingIntent.getService(getContext(), ServiceUI.PI_BANNER, banner, PendingIntent.FLAG_UPDATE_CURRENT); AlarmManager am = (AlarmManager) getContext().getSystemService(Context.ALARM_SERVICE); if (isChecked) { long now = new Date().getTime(); - long interval = AlarmManager.INTERVAL_DAY; + long interval = AlarmManager.INTERVAL_DAY * 7; long due = interval - (now % interval); long trigger = now + due; Log.i("Set banner alarm at " + new Date(trigger) + " due=" + due); diff --git a/app/src/main/java/eu/faircode/email/ServiceUI.java b/app/src/main/java/eu/faircode/email/ServiceUI.java index 6731d3c194..023f3ac3e8 100644 --- a/app/src/main/java/eu/faircode/email/ServiceUI.java +++ b/app/src/main/java/eu/faircode/email/ServiceUI.java @@ -52,7 +52,7 @@ public class ServiceUI extends IntentService { static final int PI_IGNORED = 10; static final int PI_THREAD = 11; static final int PI_WAKEUP = 12; - static final int PI_DAILY = 13; + static final int PI_BANNER = 13; public ServiceUI() { this(ServiceUI.class.getName()); @@ -153,8 +153,8 @@ public class ServiceUI extends IntentService { onWakeup(id); break; - case "daily": - onDaily(); + case "banner": + onBanner(); break; default: throw new IllegalArgumentException("Unknown UI action: " + parts[0]); @@ -428,7 +428,7 @@ public class ServiceUI extends IntentService { ServiceSynchronize.eval(ServiceUI.this, "wakeup"); } - private void onDaily() { + private void onBanner() { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); prefs.edit().remove("banner").apply(); } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 815905384a..1ef2b33926 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1001,7 +1001,7 @@ To make FairEmail sustainable in the long term, some convenience and advanced features are not free to use. FairEmail displays a small message to remind you of this, which will be removed if you purchase the pro features. - Hide small message until tomorrow + Hide small message for a week Buying pro features will allow you to use all current and future pro features, will keep this app maintained, and supported. Please see this FAQ about the price of the pro features Purchase pending