mirror of
https://github.com/M66B/FairEmail.git
synced 2026-02-03 21:45:55 +01:00
Hide banner for xxx weeks
This commit is contained in:
@@ -62,6 +62,8 @@ public class ServiceUI extends IntentService {
|
||||
static final int PI_SYNC = 13;
|
||||
static final int PI_BANNER = 14;
|
||||
|
||||
static final int HIDE_BANNER = 2; // weeks
|
||||
|
||||
public ServiceUI() {
|
||||
this(ServiceUI.class.getName());
|
||||
}
|
||||
@@ -552,7 +554,7 @@ public class ServiceUI extends IntentService {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
if (set) {
|
||||
long now = new Date().getTime();
|
||||
long interval = AlarmManager.INTERVAL_DAY * 14;
|
||||
long interval = AlarmManager.INTERVAL_DAY * HIDE_BANNER * 7;
|
||||
long due = interval - (now % interval);
|
||||
long trigger = now + due;
|
||||
Log.i("Set banner alarm at " + new Date(trigger) + " due=" + due);
|
||||
|
||||
Reference in New Issue
Block a user