Skip to content

Commit 3a96dd2

Browse files
eriedclaude
andcommitted
Alarm vibrate: rename Both→All, put it first, make it the default
Picker reorders to All / Phone / Watch and new alarms default to "All" (stored key "BOTH" stays for backup/sync compatibility). The user shouldn't have to think about whether a watch is paired — when none is, WatchVibrator.vibrate() iterates over zero connected nodes and silently no-ops, so the phone branch still fires and nothing errors. "All" instead of "Both" so the label keeps making sense if we add another haptic channel (paired earbud, etc.). Locale labels picked for "all of them" sense, not the binary "two things" sense: Alle / Todos / Tous / Tutti / Wszystkie / Все / Alla / Усі / 全部. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 53319de commit 3a96dd2

17 files changed

Lines changed: 29 additions & 21 deletions

File tree

app/src/main/java/com/eried/eucplanet/data/model/AlarmRule.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@ data class AlarmRule(
3131
val vibrateDurationMs: Int = 500,
3232
/**
3333
* Where the buzz fires when [vibrateEnabled] is true: "PHONE", "WATCH",
34-
* or "BOTH". Wear OS uses the same Vibrator API as Android phones, so the
35-
* duration applies on the watch identically. Defaults to PHONE so existing
36-
* rules behave unchanged for users who haven't paired a watch.
34+
* or "BOTH". Defaults to BOTH so a rider gets the haptic on whichever
35+
* device they're paying attention to — if no watch is paired, the WATCH
36+
* branch in [com.eried.eucplanet.wear.WatchVibrator] silently no-ops.
37+
* The storage key stays "BOTH" for backup/sync compatibility even though
38+
* the UI label is "All".
3739
*/
38-
val vibrateTarget: String = "PHONE",
40+
val vibrateTarget: String = "BOTH",
3941

4042
// Timing
4143
val cooldownSeconds: Int = 10,

app/src/main/java/com/eried/eucplanet/ui/settings/AlarmSettingsContent.kt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,10 +516,16 @@ private fun AlarmRuleEditorDialog(
516516
fontSize = 12.sp,
517517
color = MaterialTheme.colorScheme.onSurfaceVariant
518518
)
519+
// "BOTH" is first + the default for new alarms — the rider doesn't
520+
// need to think about whether a watch is paired or not (no watch
521+
// connected → that branch silently no-ops, see WatchVibrator). The
522+
// storage key stays "BOTH" for compatibility; the user-visible label
523+
// is "All" since "Both" reads as "phone + watch only" while "All"
524+
// covers any future channels (e.g., paired earbud haptics).
519525
val targetEntries = listOf(
526+
"BOTH" to stringResource(R.string.alarm_vibrate_target_both),
520527
"PHONE" to stringResource(R.string.alarm_vibrate_target_phone),
521-
"WATCH" to stringResource(R.string.alarm_vibrate_target_watch),
522-
"BOTH" to stringResource(R.string.alarm_vibrate_target_both)
528+
"WATCH" to stringResource(R.string.alarm_vibrate_target_watch)
523529
)
524530
SingleChoiceSegmentedButtonRow(
525531
modifier = Modifier

app/src/main/res/values-b+es+419/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@
438438
<string name="alarm_vibrate_target_label">Vibrar en</string>
439439
<string name="alarm_vibrate_target_phone">Celular</string>
440440
<string name="alarm_vibrate_target_watch">Reloj</string>
441-
<string name="alarm_vibrate_target_both">Ambos</string>
441+
<string name="alarm_vibrate_target_both">Todos</string>
442442
<string name="alarm_section_timing">Tiempos</string>
443443
<string name="alarm_cooldown_fmt">Pausa: %1$ds</string>
444444
<string name="alarm_cooldown_help">Tiempo mínimo entre disparos de esta regla, aunque la condición se siga cumpliendo</string>

app/src/main/res/values-da/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@
362362
<string name="action_reorder">Træk for at ændre rækkefølge</string>
363363
<string name="alarm_delete_body">%1$s fjernes. Dette kan ikke fortrydes.</string>
364364
<string name="alarm_delete_title">Slet denne alarm?</string>
365-
<string name="alarm_vibrate_target_both">Begge</string>
365+
<string name="alarm_vibrate_target_both">Alle</string>
366366
<string name="alarm_vibrate_target_label">Vibrér på</string>
367367
<string name="alarm_vibrate_target_phone">Telefon</string>
368368
<string name="alarm_vibrate_target_watch">Ur</string>

app/src/main/res/values-de/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@
377377
<string name="action_reorder">Zum Umsortieren ziehen</string>
378378
<string name="alarm_delete_body">%1$s wird entfernt. Das kann nicht rückgängig gemacht werden.</string>
379379
<string name="alarm_delete_title">Diesen Alarm löschen?</string>
380-
<string name="alarm_vibrate_target_both">Beide</string>
380+
<string name="alarm_vibrate_target_both">Alle</string>
381381
<string name="alarm_vibrate_target_label">Vibrieren auf</string>
382382
<string name="alarm_vibrate_target_phone">Telefon</string>
383383
<string name="alarm_vibrate_target_watch">Uhr</string>

app/src/main/res/values-es/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@
378378
<string name="action_reorder">Arrastra para reordenar</string>
379379
<string name="alarm_delete_body">%1$s será eliminada. Esta acción no se puede deshacer.</string>
380380
<string name="alarm_delete_title">¿Eliminar esta alarma?</string>
381-
<string name="alarm_vibrate_target_both">Ambos</string>
381+
<string name="alarm_vibrate_target_both">Todos</string>
382382
<string name="alarm_vibrate_target_label">Vibrar en</string>
383383
<string name="alarm_vibrate_target_phone">Teléfono</string>
384384
<string name="alarm_vibrate_target_watch">Reloj</string>

app/src/main/res/values-fr/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@
362362
<string name="action_reorder">Glisser pour réorganiser</string>
363363
<string name="alarm_delete_body">%1$s sera supprimée. Action irréversible.</string>
364364
<string name="alarm_delete_title">Supprimer cette alarme ?</string>
365-
<string name="alarm_vibrate_target_both">Les deux</string>
365+
<string name="alarm_vibrate_target_both">Tous</string>
366366
<string name="alarm_vibrate_target_label">Vibrer sur</string>
367367
<string name="alarm_vibrate_target_phone">Téléphone</string>
368368
<string name="alarm_vibrate_target_watch">Montre</string>

app/src/main/res/values-it/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@
438438
<string name="alarm_vibrate_target_label">Vibra su</string>
439439
<string name="alarm_vibrate_target_phone">Telefono</string>
440440
<string name="alarm_vibrate_target_watch">Orologio</string>
441-
<string name="alarm_vibrate_target_both">Entrambi</string>
441+
<string name="alarm_vibrate_target_both">Tutti</string>
442442
<string name="alarm_section_timing">Tempistiche</string>
443443
<string name="alarm_cooldown_fmt">Pausa: %1$ds</string>
444444
<string name="alarm_cooldown_help">Tempo minimo tra due attivazioni di questa regola, anche se la condizione resta vera</string>

app/src/main/res/values-nl/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@
438438
<string name="alarm_vibrate_target_label">Trillen op</string>
439439
<string name="alarm_vibrate_target_phone">Telefoon</string>
440440
<string name="alarm_vibrate_target_watch">Horloge</string>
441-
<string name="alarm_vibrate_target_both">Beide</string>
441+
<string name="alarm_vibrate_target_both">Alle</string>
442442
<string name="alarm_section_timing">Timing</string>
443443
<string name="alarm_cooldown_fmt">Cooldown: %1$ds</string>
444444
<string name="alarm_cooldown_help">Minimale tijd tussen vuringen voor deze regel, ook als de voorwaarde blijft passen</string>

app/src/main/res/values-no/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@
378378
<string name="action_reorder">Dra for å endre rekkefølge</string>
379379
<string name="alarm_delete_body">%1$s blir fjernet. Dette kan ikke angres.</string>
380380
<string name="alarm_delete_title">Slette denne alarmen?</string>
381-
<string name="alarm_vibrate_target_both">Begge</string>
381+
<string name="alarm_vibrate_target_both">Alle</string>
382382
<string name="alarm_vibrate_target_label">Vibrer på</string>
383383
<string name="alarm_vibrate_target_phone">Telefon</string>
384384
<string name="alarm_vibrate_target_watch">Klokke</string>

0 commit comments

Comments
 (0)