From 113e94bdc6e2c2f950501aa260697a8ac6a43da6 Mon Sep 17 00:00:00 2001 From: TheRealAshik <177647015+TheRealAshik@users.noreply.github.com> Date: Sat, 16 May 2026 07:51:50 +0000 Subject: [PATCH] feat: wire up settings URLs to open in browser\n\n- Add `LocalUriHandler` to open external URLs when users tap rows.\n- Implement open URL actions for Share Feedback, Get Help, Terms of Service, and Privacy Policy. --- .../dev/therealashik/github/settings/SettingsScreen.kt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/composeApp/src/commonMain/kotlin/dev/therealashik/github/settings/SettingsScreen.kt b/composeApp/src/commonMain/kotlin/dev/therealashik/github/settings/SettingsScreen.kt index 04b374e..77a2bb9 100644 --- a/composeApp/src/commonMain/kotlin/dev/therealashik/github/settings/SettingsScreen.kt +++ b/composeApp/src/commonMain/kotlin/dev/therealashik/github/settings/SettingsScreen.kt @@ -10,6 +10,7 @@ import androidx.compose.material3.* import androidx.compose.runtime.* import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.LocalUriHandler import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.lifecycle.Lifecycle @@ -36,6 +37,7 @@ fun SettingsScreen( LaunchedEffect(lifecycleState) { if (lifecycleState == Lifecycle.State.RESUMED) viewModel.refresh() } + val uriHandler = LocalUriHandler.current if (showAccountsSheet) { AccountsSheet( @@ -120,10 +122,10 @@ fun SettingsScreen( // More Options Section item { SettingsSectionHeader(stringResource(Res.string.settings_section_more_options)) - SettingsRow(title = stringResource(Res.string.settings_share_feedback), onClick = { /* TODO */ }) - SettingsRow(title = stringResource(Res.string.settings_get_help), onClick = { /* TODO */ }) - SettingsRow(title = stringResource(Res.string.settings_terms_of_service), onClick = { /* TODO */ }) - SettingsRow(title = stringResource(Res.string.settings_privacy_policy), onClick = { /* TODO */ }) + SettingsRow(title = stringResource(Res.string.settings_share_feedback), onClick = { uriHandler.openUri("https://github.com/mobile/feedback") }) + SettingsRow(title = stringResource(Res.string.settings_get_help), onClick = { uriHandler.openUri("https://support.github.com") }) + SettingsRow(title = stringResource(Res.string.settings_terms_of_service), onClick = { uriHandler.openUri("https://docs.github.com/en/site-policy/github-terms/github-terms-of-service") }) + SettingsRow(title = stringResource(Res.string.settings_privacy_policy), onClick = { uriHandler.openUri("https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement") }) SettingsRow(title = stringResource(Res.string.settings_open_source_libraries), onClick = { /* TODO */ }) SettingsRow( title = stringResource(Res.string.settings_sign_out),