Skip Gmail/Outlook check after the act

pull/208/head
M66B 2 years ago
parent d7c9a2907c
commit baddbc2337

@ -4732,7 +4732,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
}
private boolean checkGmail() {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
final Context context = getContext();
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
if (prefs.getBoolean("gmail_checked", false))
return false;
@ -4745,6 +4746,11 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
cal.set(Calendar.MONTH, Calendar.MAY);
cal.set(Calendar.YEAR, 2022);
if (Helper.getInstallTime(context) > cal.getTimeInMillis()) {
prefs.edit().putBoolean("gmail_checked", true).apply();
return false;
}
cal.add(Calendar.MONTH, 2);
long now = new Date().getTime();
@ -4812,7 +4818,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
if (!BuildConfig.DEBUG)
return false;
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
final Context context = getContext();
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
if (prefs.getBoolean("outlook_checked", false))
return false;
@ -4825,6 +4832,11 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
cal.set(Calendar.MONTH, Calendar.OCTOBER);
cal.set(Calendar.YEAR, 2022);
if (Helper.getInstallTime(context) > cal.getTimeInMillis()) {
prefs.edit().putBoolean("outlook_checked", true).apply();
return false;
}
cal.add(Calendar.MONTH, 2);
long now = new Date().getTime();

Loading…
Cancel
Save