mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-23 22:51:02 +00:00
Gmail notice for 2 months
This commit is contained in:
parent
3164f39a4a
commit
ce722644b7
1 changed files with 17 additions and 0 deletions
|
@ -4593,6 +4593,23 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
if (prefs.getBoolean("gmail_checked", false))
|
||||
return false;
|
||||
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.set(Calendar.MILLISECOND, 0);
|
||||
cal.set(Calendar.SECOND, 0);
|
||||
cal.set(Calendar.MINUTE, 0);
|
||||
cal.set(Calendar.HOUR, 0);
|
||||
cal.set(Calendar.DAY_OF_MONTH, 30);
|
||||
cal.set(Calendar.MONTH, Calendar.MAY);
|
||||
cal.set(Calendar.YEAR, 2022);
|
||||
|
||||
cal.add(Calendar.MONTH, 2);
|
||||
|
||||
long now = new Date().getTime();
|
||||
if (now > cal.getTimeInMillis()) {
|
||||
prefs.edit().putBoolean("gmail_checked", true).apply();
|
||||
return false;
|
||||
}
|
||||
|
||||
new SimpleTask<List<EntityAccount>>() {
|
||||
@Override
|
||||
protected List<EntityAccount> onExecute(Context context, Bundle args) throws Throwable {
|
||||
|
|
Loading…
Reference in a new issue