mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 00:59:49 +01:00
Update mute options.
2 hours -> 8 hours 1 year -> Always These options should make way more sense, and existing mute settings will continue to be respected.
This commit is contained in:
committed by
Alex Hart
parent
58a32c11ec
commit
3162f04937
@@ -38,10 +38,10 @@ public class MuteDialog extends AlertDialog {
|
||||
|
||||
switch (which) {
|
||||
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(8); break;
|
||||
case 2: muteUntil = System.currentTimeMillis() + TimeUnit.DAYS.toMillis(1); break;
|
||||
case 3: muteUntil = System.currentTimeMillis() + TimeUnit.DAYS.toMillis(7); break;
|
||||
case 4: muteUntil = System.currentTimeMillis() + TimeUnit.DAYS.toMillis(365); break;
|
||||
case 4: muteUntil = Long.MAX_VALUE; break;
|
||||
default: muteUntil = System.currentTimeMillis() + TimeUnit.HOURS.toMillis(1); break;
|
||||
}
|
||||
|
||||
|
||||
@@ -333,10 +333,14 @@ public class ManageGroupFragment extends LoggingFragment {
|
||||
muteNotificationsUntilLabel.setVisibility(muteState.isMuted() ? View.VISIBLE : View.GONE);
|
||||
|
||||
if (muteState.isMuted()) {
|
||||
muteNotificationsUntilLabel.setText(getString(R.string.ManageGroupActivity_until_s,
|
||||
DateUtils.getTimeString(requireContext(),
|
||||
Locale.getDefault(),
|
||||
muteState.getMutedUntil())));
|
||||
if (muteState.getMutedUntil() == Long.MAX_VALUE) {
|
||||
muteNotificationsUntilLabel.setText(R.string.ManageGroupActivity_always);
|
||||
} else {
|
||||
muteNotificationsUntilLabel.setText(getString(R.string.ManageGroupActivity_until_s,
|
||||
DateUtils.getTimeString(requireContext(),
|
||||
Locale.getDefault(),
|
||||
muteState.getMutedUntil())));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -373,10 +373,14 @@ public class ManageRecipientFragment extends LoggingFragment {
|
||||
muteNotificationsUntilLabel.setVisibility(muteState.isMuted() ? View.VISIBLE : View.GONE);
|
||||
|
||||
if (muteState.isMuted()) {
|
||||
muteNotificationsUntilLabel.setText(getString(R.string.ManageRecipientActivity_until_s,
|
||||
DateUtils.getTimeString(requireContext(),
|
||||
Locale.getDefault(),
|
||||
muteState.getMutedUntil())));
|
||||
if (muteState.getMutedUntil() == Long.MAX_VALUE) {
|
||||
muteNotificationsUntilLabel.setText(R.string.ManageRecipientActivity_always);
|
||||
} else {
|
||||
muteNotificationsUntilLabel.setText(getString(R.string.ManageRecipientActivity_until_s,
|
||||
DateUtils.getTimeString(requireContext(),
|
||||
Locale.getDefault(),
|
||||
muteState.getMutedUntil())));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user