mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 12:05:22 +00:00
Add the option to mute notifications for one year.
Fixes #4448. Closes #4454
This commit is contained in:
parent
d05097a6fd
commit
181c7dfd85
@ -158,6 +158,7 @@
|
|||||||
<item>@string/arrays__mute_for_two_hours</item>
|
<item>@string/arrays__mute_for_two_hours</item>
|
||||||
<item>@string/arrays__mute_for_one_day</item>
|
<item>@string/arrays__mute_for_one_day</item>
|
||||||
<item>@string/arrays__mute_for_seven_days</item>
|
<item>@string/arrays__mute_for_seven_days</item>
|
||||||
|
<item>@string/arrays__mute_for_one_year</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="recipient_vibrate_entries">
|
<string-array name="recipient_vibrate_entries">
|
||||||
|
@ -840,6 +840,7 @@
|
|||||||
<string name="arrays__mute_for_two_hours">Mute for 2 hours</string>
|
<string name="arrays__mute_for_two_hours">Mute for 2 hours</string>
|
||||||
<string name="arrays__mute_for_one_day">Mute for 1 day</string>
|
<string name="arrays__mute_for_one_day">Mute for 1 day</string>
|
||||||
<string name="arrays__mute_for_seven_days">Mute for 7 days</string>
|
<string name="arrays__mute_for_seven_days">Mute for 7 days</string>
|
||||||
|
<string name="arrays__mute_for_one_year">Mute for 1 year</string>
|
||||||
|
|
||||||
<string name="arrays__settings_default">Settings default</string>
|
<string name="arrays__settings_default">Settings default</string>
|
||||||
<string name="arrays__enabled">Enabled</string>
|
<string name="arrays__enabled">Enabled</string>
|
||||||
|
@ -21,11 +21,12 @@ public class MuteDialog extends AlertDialogWrapper {
|
|||||||
final long muteUntil;
|
final long muteUntil;
|
||||||
|
|
||||||
switch (which) {
|
switch (which) {
|
||||||
case 0: muteUntil = System.currentTimeMillis() + TimeUnit.HOURS.toMillis(1); break;
|
case 0: muteUntil = System.currentTimeMillis() + TimeUnit.HOURS.toMillis(1); break;
|
||||||
case 1: muteUntil = System.currentTimeMillis() + TimeUnit.HOURS.toMillis(2); break;
|
case 1: muteUntil = System.currentTimeMillis() + TimeUnit.HOURS.toMillis(2); break;
|
||||||
case 2: muteUntil = System.currentTimeMillis() + TimeUnit.DAYS.toMillis(1); break;
|
case 2: muteUntil = System.currentTimeMillis() + TimeUnit.DAYS.toMillis(1); break;
|
||||||
case 3: muteUntil = System.currentTimeMillis() + TimeUnit.DAYS.toMillis(7); break;
|
case 3: muteUntil = System.currentTimeMillis() + TimeUnit.DAYS.toMillis(7); break;
|
||||||
default: muteUntil = System.currentTimeMillis() + TimeUnit.HOURS.toMillis(1); break;
|
case 4: muteUntil = System.currentTimeMillis() + TimeUnit.DAYS.toMillis(365); break;
|
||||||
|
default: muteUntil = System.currentTimeMillis() + TimeUnit.HOURS.toMillis(1); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
listener.onMuted(muteUntil);
|
listener.onMuted(muteUntil);
|
||||||
|
Loading…
Reference in New Issue
Block a user