mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-27 16:10:58 +01:00
Allow hiding pro banner one day
This commit is contained in:
@@ -52,6 +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;
|
||||
|
||||
public ServiceUI() {
|
||||
this(ServiceUI.class.getName());
|
||||
@@ -151,6 +152,10 @@ public class ServiceUI extends IntentService {
|
||||
// https://developer.android.com/reference/android/app/AlarmManager
|
||||
onWakeup(id);
|
||||
break;
|
||||
|
||||
case "daily":
|
||||
onDaily();
|
||||
break;
|
||||
default:
|
||||
throw new IllegalArgumentException("Unknown UI action: " + parts[0]);
|
||||
}
|
||||
@@ -403,4 +408,9 @@ public class ServiceUI extends IntentService {
|
||||
db.endTransaction();
|
||||
}
|
||||
}
|
||||
|
||||
private void onDaily() {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
prefs.edit().remove("banner").apply();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user