Modern Apps git

← Modern-Apps.git

clock: remove manual watch sync chip from wear alarms

Commit
4261eb1366716d9cf41c0c544a3830f7106b59ec
Author
Vayun Mathur <[email protected]>
When
2026-12-05 16:53 UTC (18 hours ago)
Parents
4ba3ff5
Phone-to-watch sync is now fully automatic over the Watch conduit (connect, registration and the 15-minute ConduitSyncScheduler triggers, plus phone-change pushes), so the manual 'Sync now' chip on the wear alarms screen is dead weight.

Remove the Sync chip, its onRequestSync plumbing and the wear_request_sync string, and update the wear screenshot preview. The automatic WearClockSync publisher, ConduitSyncTriggerReceiver and WearLinkBridge sync paths are unchanged.

Verified: :clock:lint :clock:lintVitalRelease pass; :clock:testDevUnitTest has one pre-existing failure (ClockPagesUiTest sqlcipher nativeOpen, also failing on clean origin/main); :clock:metadata regenerated.

Diff

clock/src/main/java/com/vayunmathur/clock/ui/WearAlarmsScreen.kt
diff --git a/clock/src/main/java/com/vayunmathur/clock/ui/WearAlarmsScreen.kt b/clock/src/main/java/com/vayunmathur/clock/ui/WearAlarmsScreen.ktindex 7a90c9708c..604250f7d0 100644--- a/clock/src/main/java/com/vayunmathur/clock/ui/WearAlarmsScreen.kt+++ b/clock/src/main/java/com/vayunmathur/clock/ui/WearAlarmsScreen.kt@@ -6,9 +6,7 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue import androidx.compose.runtime.remember-import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.ui.Modifier-import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp@@ -25,8 +23,6 @@ import com.vayunmathur.library.wearlink.clock.WearClockAlarm import com.vayunmathur.clock.domain.formatWearAlarmDays import com.vayunmathur.clock.domain.formatWearAlarmTime import com.vayunmathur.clock.domain.resolveWearAlarmDisplay-import com.vayunmathur.clock.sync.WearLinkBridge-import kotlinx.coroutines.launch  /**  * Synced alarms. A row says "Armed on watch" only when the store holds@@ -36,13 +32,10 @@ import kotlinx.coroutines.launch @Composable fun WearAlarmsScreen(store: WearClockStore, onBack: () -> Unit, onOpenAlarm: (Long) -> Unit) {     val persisted by store.state.collectAsState()-    val context = LocalContext.current-    val scope = rememberCoroutineScope()     val nowMillis = remember(persisted) { System.currentTimeMillis() }     WearAlarmsContent(         persisted = persisted,         nowMillis = nowMillis,-        onRequestSync = { scope.launch { WearLinkBridge.requestSync(context) } },         onBack = onBack,         onOpenAlarm = onOpenAlarm,     )@@ -57,7 +50,6 @@ fun WearAlarmsScreen(store: WearClockStore, onBack: () -> Unit, onOpenAlarm: (Lo internal fun WearAlarmsContent(     persisted: com.vayunmathur.clock.data.WearClockPersisted,     nowMillis: Long,-    onRequestSync: () -> Unit,     onBack: () -> Unit,     onOpenAlarm: (Long) -> Unit, ) {@@ -90,14 +82,6 @@ internal fun WearAlarmsContent(                 WearAlarmChip(alarm, state) { onOpenAlarm(alarm.alarmId) }             }         }-        item {-            Chip(-                onClick = onRequestSync,-                label = { Text(stringResource(R.string.wear_request_sync), maxLines = 1) },-                colors = ChipDefaults.secondaryChipColors(),-                modifier = Modifier.fillMaxWidth().padding(horizontal = 8.dp),-            )-        }         item {             Chip(                 onClick = onBack,
clock/src/main/res/values/wear_strings.xml
diff --git a/clock/src/main/res/values/wear_strings.xml b/clock/src/main/res/values/wear_strings.xmlindex ce976bb1ca..52f8a8cb41 100644--- a/clock/src/main/res/values/wear_strings.xml+++ b/clock/src/main/res/values/wear_strings.xml@@ -19,7 +19,6 @@     <string name="wear_next_ring">Next ring: %1$s</string>     <string name="wear_rearm">Arm on watch</string>     <string name="wear_exact_settings">Exact alarm access</string>-    <string name="wear_request_sync">Sync now</string>     <string name="wear_timer_presets">Start a timer</string>     <string name="wear_timer_schedule_failed">Could not schedule that timer on this watch — it is not running.</string>     <string name="wear_timer_finished">Finished</string>
clock/src/screenshotTest/kotlin/com/vayunmathur/clock/ui/WearMetadataPreviews.kt
diff --git a/clock/src/screenshotTest/kotlin/com/vayunmathur/clock/ui/WearMetadataPreviews.kt b/clock/src/screenshotTest/kotlin/com/vayunmathur/clock/ui/WearMetadataPreviews.ktindex 36d0dcfd29..aad6033cce 100644--- a/clock/src/screenshotTest/kotlin/com/vayunmathur/clock/ui/WearMetadataPreviews.kt+++ b/clock/src/screenshotTest/kotlin/com/vayunmathur/clock/ui/WearMetadataPreviews.kt@@ -66,7 +66,6 @@ class WearMetadataPreviews {                     ),                 ),                 nowMillis = FIXED_NOW_MILLIS,-                onRequestSync = {},                 onBack = {},                 onOpenAlarm = {},             )