'Repeat notifications' default to 'off'.

This commit is contained in:
B. Petersen
2017-01-02 13:02:56 +01:00
parent e2bad18153
commit 268006d027
9 changed files with 25 additions and 61 deletions
+1 -1
View File
@@ -129,7 +129,7 @@ android {
defaultConfig {
minSdkVersion 14 // 14: Android 4.0 Ice Cream Sandwich 2011 (Telegram default), 21: Android 5.0 Lollipop 2014 (recommended for InstantRun)
targetSdkVersion 23
versionName "0.1.11"
versionName "0.1.12"
}
}
@@ -813,7 +813,7 @@ public class NotificationsController {
try {
PendingIntent pintent = PendingIntent.getService(ApplicationLoader.applicationContext, 0, new Intent(ApplicationLoader.applicationContext, NotificationRepeat.class), 0);
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("Notifications", Activity.MODE_PRIVATE);
int minutes = preferences.getInt("repeat_messages", 60);
int minutes = preferences.getInt("repeat_messages", 0);
if (minutes > 0 && personal_count > 0) {
alarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, SystemClock.elapsedRealtime() + minutes * 60 * 1000, pintent);
} else {
@@ -418,7 +418,7 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
builder.setTitle(LocaleController.getString("RepeatNotifications", R.string.RepeatNotifications));
builder.setItems(new CharSequence[]{
LocaleController.getString("RepeatDisabled", R.string.RepeatDisabled),
LocaleController.getString("Off", R.string.Off),
LocaleController.formatPluralString("Minutes", 5),
LocaleController.formatPluralString("Minutes", 10),
LocaleController.formatPluralString("Minutes", 30),
@@ -558,9 +558,9 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
view = new HeaderCell(mContext);
}
if (i == messageSectionRow) {
((HeaderCell) view).setText(LocaleController.getString("MessageNotifications", R.string.MessageNotifications));
((HeaderCell) view).setText(LocaleController.getString("NormalMessagess", R.string.NormalMessages));
} else if (i == groupSectionRow) {
((HeaderCell) view).setText(LocaleController.getString("GroupNotifications", R.string.GroupNotifications));
((HeaderCell) view).setText(LocaleController.getString("GroupMessages", R.string.GroupMessages));
} else if (i == inappSectionRow) {
((HeaderCell) view).setText(LocaleController.getString("InAppNotifications", R.string.InAppNotifications));
} else if (i == otherSectionRow) {
@@ -659,10 +659,10 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
textCell.setTextAndValue(LocaleController.getString("NotificationsPriority", R.string.NotificationsPriority), LocaleController.getString("NotificationsPriorityMax", R.string.NotificationsPriorityMax), false);
}
} else if (i == repeatRow) {
int minutes = preferences.getInt("repeat_messages", 60);
int minutes = preferences.getInt("repeat_messages", 0);
String value;
if (minutes == 0) {
value = LocaleController.getString("RepeatNotificationsNever", R.string.RepeatNotificationsNever);
value = LocaleController.getString("Off", R.string.Off);
} else if (minutes < 60) {
value = LocaleController.formatPluralString("Minutes", minutes);
} else {
@@ -178,19 +178,15 @@
<string name="EnableAnimations">Übergänge animieren</string>
<string name="UnblockContact">Benutzer nicht mehr blockieren</string>
<string name="NoBlocked">Keine blockierten Benutzer</string>
<string name="MessageNotifications">Nachrichten</string>
<string name="NormalMessages">Normale Nachrichten</string>
<string name="Alert">Benachrichtigung</string>
<string name="MessagePreview">Vorschau</string>
<string name="GroupNotifications">Gruppen</string>
<string name="GroupMessages">Gruppennachrichten</string>
<string name="Sound">Nachrichtenton</string>
<string name="InAppNotifications">Bei App im Vordergrund</string>
<string name="InAppSounds">In-App-Töne</string>
<string name="InAppVibrate">In-App-Vibration</string>
<string name="Vibrate">Vibrieren</string>
<string name="InAppPreview">In-App-Vorschau</string>
<string name="Reset">Zurücksetzen</string>
<string name="ResetAllNotifications">Mitteilungseinstellungen zurücksetzen</string>
<string name="UndoAllCustom">Setzt alle benutzerdefinierten Einstellungen für Mitteilungen zurück</string>
<string name="NotificationsAndSounds">Mitteilungen und Töne</string>
<string name="BlockedUsers">Blockierte Benutzer</string>
<string name="NoSound">Kein Ton</string>
@@ -218,16 +214,14 @@
<string name="EditName">Name bearbeiten</string>
<string name="NotificationsPriority">Darstellung</string>
<string name="NotificationsPriorityDefault">Normale Priorität</string>
<string name="NotificationsPriorityLow">Niedrige Priorität</string>
<string name="NotificationsPriorityHigh">Hohe Priorität</string>
<string name="NotificationsPriorityMax">Höchste Priorität</string>
<string name="RepeatNotificationsNever">Niemals</string>
<string name="RepeatNotifications">Erneut benachrichtigen</string>
<string name="NotificationsOther">Sonstiges</string>
<string name="NotificationsDisabled">Deaktiviert</string>
<string name="VibrationDisabled">Deaktiviert</string>
<string name="LedDisabled">Deaktiviert</string>
<string name="RepeatDisabled">Aus</string>
<string name="Off">Aus</string>
<string name="InChatSound">In-Chat-Töne</string>
<string name="SoundDefault">Standard</string>
<string name="VibrationDefault">Standard</string>
@@ -178,19 +178,15 @@
<string name="EnableAnimations">Activar animaciones</string>
<string name="UnblockContact">Desbloquear</string>
<string name="NoBlocked">Sin usuarios bloqueados</string>
<string name="MessageNotifications">Notificación de mensajes</string>
<string name="NormalMessages">Notificación de mensajes</string>
<string name="Alert">Alerta</string>
<string name="MessagePreview">Vista previa del mensaje</string>
<string name="GroupNotifications">Notificaciones de grupo</string>
<string name="GroupMessages">Notificaciones de grupo</string>
<string name="Sound">Sonido</string>
<string name="InAppNotifications">Notificaciones en la app</string>
<string name="InAppSounds">Sonidos en la app</string>
<string name="InAppVibrate">Vibración en la app</string>
<string name="Vibrate">Vibraciones</string>
<string name="InAppPreview">Vista previa en la app</string>
<string name="Reset">Restablecer</string>
<string name="ResetAllNotifications">Restablecer las notificaciones</string>
<string name="UndoAllCustom">Deshacer las notificaciones personalizadas para todos tus usuarios y grupos</string>
<string name="NotificationsAndSounds">Notificaciones y sonidos</string>
<string name="BlockedUsers">Usuarios bloqueados</string>
<string name="NoSound">Sin sonido</string>
@@ -218,16 +214,14 @@
<string name="EditName">Editar nombre</string>
<string name="NotificationsPriority">Prioridad</string>
<string name="NotificationsPriorityDefault">Por defecto</string>
<string name="NotificationsPriorityLow">Baja</string>
<string name="NotificationsPriorityHigh">Alta</string>
<string name="NotificationsPriorityMax">Máxima</string>
<string name="RepeatNotificationsNever">Nunca</string>
<string name="RepeatNotifications">Repetir notificaciones</string>
<string name="NotificationsOther">Otras</string>
<string name="NotificationsDisabled">Desactivadas</string>
<string name="VibrationDisabled">Desactivadas</string>
<string name="LedDisabled">Desactivado</string>
<string name="RepeatDisabled">Apagado</string>
<string name="Off">Apagado</string>
<string name="InChatSound">Sonidos en el chat</string>
<string name="SoundDefault">Por defecto</string>
<string name="VibrationDefault">Por defecto</string>
@@ -178,19 +178,15 @@
<string name="EnableAnimations">Abilita animazioni</string>
<string name="UnblockContact">Sblocca</string>
<string name="NoBlocked">Ancora nessun utente bloccato</string>
<string name="MessageNotifications">Notifiche messaggio</string>
<string name="NormalMessages">Notifiche messaggio</string>
<string name="Alert">Avviso</string>
<string name="MessagePreview">Anteprima messaggio</string>
<string name="GroupNotifications">Notifiche di gruppo</string>
<string name="GroupMessages">Notifiche di gruppo</string>
<string name="Sound">Suono</string>
<string name="InAppNotifications">Notifiche in-app</string>
<string name="InAppSounds">Suoni in-app</string>
<string name="InAppVibrate">Vibrazione in-app</string>
<string name="Vibrate">Vibrazione</string>
<string name="InAppPreview">Anteprima in-app</string>
<string name="Reset">Ripristina</string>
<string name="ResetAllNotifications">Ripristina tutte le notifiche</string>
<string name="UndoAllCustom">Annulla tutte le impostazioni di notifica personalizzate per tutti i tuoi contatti e gruppi</string>
<string name="NotificationsAndSounds">Notifiche e suoni</string>
<string name="BlockedUsers">Utenti bloccati</string>
<string name="NoSound">Nessun suono</string>
@@ -218,16 +214,14 @@
<string name="EditName">Modifica nome</string>
<string name="NotificationsPriority">Priorità</string>
<string name="NotificationsPriorityDefault">Predefinita</string>
<string name="NotificationsPriorityLow">Bassa</string>
<string name="NotificationsPriorityHigh">Alta</string>
<string name="NotificationsPriorityMax">Massima</string>
<string name="RepeatNotificationsNever">Mai</string>
<string name="RepeatNotifications">Ripeti notifiche</string>
<string name="NotificationsOther">Altro</string>
<string name="NotificationsDisabled">Disabilitate</string>
<string name="VibrationDisabled">Disabilitata</string>
<string name="LedDisabled">Disabilitato</string>
<string name="RepeatDisabled">No</string>
<string name="Off">No</string>
<string name="InChatSound">Suoni in-chat</string>
<string name="SoundDefault">Predefinito</string>
<string name="VibrationDefault">Predefinita</string>
@@ -178,19 +178,15 @@
<string name="EnableAnimations">Animaties</string>
<string name="UnblockContact">Deblokkeer</string>
<string name="NoBlocked">Geen geblokkeerde gebruikers</string>
<string name="MessageNotifications">Berichtmeldingen</string>
<string name="NormalMessages">Berichtmeldingen</string>
<string name="Alert">Waarschuwing</string>
<string name="MessagePreview">Voorvertoning</string>
<string name="GroupNotifications">Groepsmeldingen</string>
<string name="GroupMessages">Groepsmeldingen</string>
<string name="Sound">Geluid</string>
<string name="InAppNotifications">In-app meldingen</string>
<string name="InAppSounds">Geluiden</string>
<string name="InAppVibrate">Trillen</string>
<string name="Vibrate">Trillen</string>
<string name="InAppPreview">Voorvertoningen</string>
<string name="Reset">Resetten</string>
<string name="ResetAllNotifications">Meldingen resetten</string>
<string name="UndoAllCustom">Aangepaste meldingsinstellingen wissen voor contacten en groepen.</string>
<string name="NotificationsAndSounds">Meldingen en geluiden</string>
<string name="BlockedUsers">Geblokkeerd</string>
<string name="NoSound">Geen geluid</string>
@@ -218,16 +214,14 @@
<string name="EditName">Naam wijzigen</string>
<string name="NotificationsPriority">Prioriteit</string>
<string name="NotificationsPriorityDefault">Standaard</string>
<string name="NotificationsPriorityLow">Laag</string>
<string name="NotificationsPriorityHigh">Hoog</string>
<string name="NotificationsPriorityMax">Max</string>
<string name="RepeatNotificationsNever">Nooit</string>
<string name="RepeatNotifications">Meldingen herhalen</string>
<string name="NotificationsOther">Overig</string>
<string name="NotificationsDisabled">Uitgeschakeld</string>
<string name="VibrationDisabled">Uitgeschakeld</string>
<string name="LedDisabled">Uitgeschakeld</string>
<string name="RepeatDisabled">Uit</string>
<string name="Off">Uit</string>
<string name="InChatSound">Chatgeluiden</string>
<string name="SoundDefault">Standaard</string>
<string name="VibrationDefault">Standaard</string>
@@ -178,19 +178,15 @@
<string name="EnableAnimations">Permitir Animações</string>
<string name="UnblockContact">Desbloquear</string>
<string name="NoBlocked">Nenhum usuário bloqueado</string>
<string name="MessageNotifications">Notificações de mensagens</string>
<string name="NormalMessages">Notificações de mensagens</string>
<string name="Alert">Alerta</string>
<string name="MessagePreview">Visualização de Mensagem</string>
<string name="GroupNotifications">Notificações de grupo</string>
<string name="GroupMessages">Notificações de grupo</string>
<string name="Sound">Som</string>
<string name="InAppNotifications">Notificações no aplicativo</string>
<string name="InAppSounds">Sons no Aplicativo</string>
<string name="InAppVibrate">Vibração no Aplicativo</string>
<string name="Vibrate">Vibrar</string>
<string name="InAppPreview">Visualização no Aplicativo</string>
<string name="Reset">Limpar</string>
<string name="ResetAllNotifications">Restaurar configurações</string>
<string name="UndoAllCustom">Desfazer todas as configurações de notificação para todos os seus contatos e grupos</string>
<string name="NotificationsAndSounds">Notificações e Sons</string>
<string name="BlockedUsers">Usuários bloqueados</string>
<string name="NoSound">Sem som</string>
@@ -218,16 +214,14 @@
<string name="EditName">Editar nome</string>
<string name="NotificationsPriority">Prioridade</string>
<string name="NotificationsPriorityDefault">Padrão</string>
<string name="NotificationsPriorityLow">Baixa</string>
<string name="NotificationsPriorityHigh">Alta</string>
<string name="NotificationsPriorityMax">Máxima</string>
<string name="RepeatNotificationsNever">Nunca</string>
<string name="RepeatNotifications">Repetir Notificações</string>
<string name="NotificationsOther">Outro</string>
<string name="NotificationsDisabled">Desativado</string>
<string name="VibrationDisabled">Desativado</string>
<string name="LedDisabled">Desativado</string>
<string name="RepeatDisabled">Desativado</string>
<string name="Off">Desativado</string>
<string name="InChatSound">Sons no Chat</string>
<string name="SoundDefault">Padrão</string>
<string name="VibrationDefault">Padrão</string>
@@ -178,19 +178,15 @@
<string name="EnableAnimations">Transition animation</string>
<string name="UnblockContact">Unblock contact</string>
<string name="NoBlocked">No blocked users yet</string>
<string name="MessageNotifications">Message notifications</string>
<string name="NormalMessages">Normal messages</string>
<string name="Alert">Alert</string>
<string name="MessagePreview">Message preview</string>
<string name="GroupNotifications">Group notifications</string>
<string name="GroupMessages">Group messages</string>
<string name="Sound">Sound</string>
<string name="InAppNotifications">In-app notifications</string>
<string name="InAppSounds">In-App Sounds</string>
<string name="InAppVibrate">In-App Vibrate</string>
<string name="Vibrate">Vibrate</string>
<string name="InAppPreview">In-App Preview</string>
<string name="Reset">Reset</string>
<string name="ResetAllNotifications">Reset all notifications</string>
<string name="UndoAllCustom">Undo all custom notification settings for all your contacts and groups</string>
<string name="NotificationsAndSounds">Notifications and sounds</string>
<string name="BlockedUsers">Blocked contacts</string>
<string name="NoSound">No sound</string>
@@ -218,16 +214,14 @@
<string name="EditName">Edit name</string>
<string name="NotificationsPriority">View</string>
<string name="NotificationsPriorityDefault">Normal priority</string>
<string name="NotificationsPriorityLow">Low priority</string>
<string name="NotificationsPriorityHigh">High priority</string>
<string name="NotificationsPriorityMax">Highest priority</string>
<string name="RepeatNotificationsNever">Never</string>
<string name="RepeatNotifications">Repeat notifications</string>
<string name="NotificationsOther">Other</string>
<string name="NotificationsDisabled">Disabled</string>
<string name="VibrationDisabled">Disabled</string>
<string name="LedDisabled">Disabled</string>
<string name="RepeatDisabled">Off</string>
<string name="Off">Off</string>
<string name="InChatSound">In-chat sounds</string>
<string name="SoundDefault">Default</string>
<string name="VibrationDefault">Default</string>