mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-01 09:16:00 +00:00
Default snooze
This commit is contained in:
parent
2b51aa00a2
commit
fabbfd5f04
2 changed files with 6 additions and 2 deletions
|
@ -69,6 +69,8 @@ public class FragmentDialogDuration extends FragmentDialogBase {
|
|||
final Context context = getContext();
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
int default_snooze = prefs.getInt("default_snooze", 1);
|
||||
if (default_snooze == 0)
|
||||
default_snooze = 1;
|
||||
|
||||
final View dview = LayoutInflater.from(context).inflate(R.layout.dialog_duration, null);
|
||||
final Button btn1hour = dview.findViewById(R.id.btn1hour);
|
||||
|
|
|
@ -439,9 +439,11 @@ public class ServiceUI extends IntentService {
|
|||
|
||||
private void onSnooze(long id) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
int notify_snooze_duration = prefs.getInt("default_snooze", 1);
|
||||
int default_snooze = prefs.getInt("default_snooze", 1);
|
||||
if (default_snooze == 0)
|
||||
default_snooze = 1;
|
||||
|
||||
long wakeup = new Date().getTime() + notify_snooze_duration * 3600 * 1000L;
|
||||
long wakeup = new Date().getTime() + default_snooze * 3600 * 1000L;
|
||||
|
||||
DB db = DB.getInstance(this);
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue