From d5f234e159e7c462f4d082d89c38ee406174a51d Mon Sep 17 00:00:00 2001 From: Brummel Date: Sun, 3 May 2026 21:14:59 +0200 Subject: [PATCH] Update edit launcher title to use case oneliner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the current case's oneliner text as the title for the remote input intent. This ensures consistency with the CaseListScreen's display when no oneliner is present, showing a "…" placeholder. This improves the user experience by making the system input picker's title match what the user just selected. --- .../com/doctate/watch/presentation/CaseDetailScreen.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/clients/wearos/app/src/main/java/com/doctate/watch/presentation/CaseDetailScreen.kt b/clients/wearos/app/src/main/java/com/doctate/watch/presentation/CaseDetailScreen.kt index e9e1c44..fd363de 100644 --- a/clients/wearos/app/src/main/java/com/doctate/watch/presentation/CaseDetailScreen.kt +++ b/clients/wearos/app/src/main/java/com/doctate/watch/presentation/CaseDetailScreen.kt @@ -93,12 +93,15 @@ fun CaseDetailScreen( } val launchEdit: () -> Unit = { + // Mirror CaseListScreen's "…" placeholder when no oneliner exists yet, + // so the system input picker shows the same title the user just tapped. + val currentTitle = case?.oneliner?.displayText() ?: "…" val languageExtras = Bundle().apply { putString(RecognizerIntent.EXTRA_LANGUAGE, VOICE_INPUT_LANGUAGE) putString(RecognizerIntent.EXTRA_LANGUAGE_PREFERENCE, VOICE_INPUT_LANGUAGE) } val remoteInput = RemoteInput.Builder(ONELINER_INPUT_KEY) - .setLabel("OneLiner") + .setLabel(currentTitle) .setAllowFreeFormInput(true) .addExtras(languageExtras) .build() @@ -107,7 +110,7 @@ fun CaseDetailScreen( putExtra(RecognizerIntent.EXTRA_LANGUAGE_PREFERENCE, VOICE_INPUT_LANGUAGE) } RemoteInputIntentHelper.putRemoteInputsExtra(intent, listOf(remoteInput)) - RemoteInputIntentHelper.putTitleExtra(intent, "OneLiner") + RemoteInputIntentHelper.putTitleExtra(intent, currentTitle) editLauncher.launch(intent) }