From f0b4ee6f57d1de92e6ba5d4f8cbe5084cb3845c6 Mon Sep 17 00:00:00 2001 From: Jason Ross Date: Sat, 27 Jun 2026 20:55:15 -0500 Subject: [PATCH] Remove the "Sign in with Google" account-setup option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Gmail's restricted https://mail.google.com/ scope needs a paid CASA assessment to ship a public release, so a dedicated Google OAuth button is a dead end. Drop it from the setup screen — Gmail is still reachable via "Other (IMAP/SMTP)" with an app password. - Removes the Google button and its now-unused launcher, coroutine scope, imports, and strings. The setup screen now offers Microsoft and Other (IMAP/SMTP). - The underlying Gmail OAuth plumbing (GmailAuthManager, addGmailAccount, the ViewModel's Gmail methods) is left intact but unexposed; it can be ripped out entirely or re-surfaced later. assemble/lint/test green; verified on the emulator. Co-Authored-By: Claude Opus 4.8 --- .../ui/accountsetup/AccountSetupScreen.kt | 22 ------------------- app/src/main/res/values/strings.xml | 2 -- 2 files changed, 24 deletions(-) diff --git a/app/src/main/kotlin/org/libremail/ui/accountsetup/AccountSetupScreen.kt b/app/src/main/kotlin/org/libremail/ui/accountsetup/AccountSetupScreen.kt index b060378..b76d5d4 100644 --- a/app/src/main/kotlin/org/libremail/ui/accountsetup/AccountSetupScreen.kt +++ b/app/src/main/kotlin/org/libremail/ui/accountsetup/AccountSetupScreen.kt @@ -32,7 +32,6 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.getValue import androidx.compose.runtime.remember -import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource @@ -40,7 +39,6 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp import androidx.hilt.navigation.compose.hiltViewModel import androidx.lifecycle.compose.collectAsStateWithLifecycle -import kotlinx.coroutines.launch import org.libremail.R @OptIn(ExperimentalMaterial3Api::class) @@ -53,12 +51,6 @@ fun AccountSetupScreen( ) { val state by viewModel.state.collectAsStateWithLifecycle() val snackbarHostState = remember { SnackbarHostState() } - val scope = rememberCoroutineScope() - val needsClientId = stringResource(R.string.account_gmail_needs_client_id) - - val launcher = rememberLauncherForActivityResult( - ActivityResultContracts.StartActivityForResult(), - ) { result -> viewModel.onGmailResult(result.data) } val outlookLauncher = rememberLauncherForActivityResult( ActivityResultContracts.StartActivityForResult(), @@ -108,20 +100,6 @@ fun AccountSetupScreen( textAlign = TextAlign.Center, ) Spacer(Modifier.height(24.dp)) - Button( - onClick = { - if (viewModel.isGmailConfigured) { - launcher.launch(viewModel.gmailAuthIntent()) - } else { - scope.launch { snackbarHostState.showSnackbar(needsClientId) } - } - }, - enabled = !busy, - modifier = Modifier.fillMaxWidth(), - ) { - Text(stringResource(R.string.account_setup_gmail)) - } - Spacer(Modifier.height(12.dp)) Button( onClick = { outlookLauncher.launch(viewModel.outlookAuthIntent()) }, enabled = !busy, diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 43208d0..1b22d21 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -67,11 +67,9 @@ No app can open this file - Sign in with Google Sign in with Microsoft Other (IMAP/SMTP) Choose how you want to connect your mailbox. - Add your Google OAuth client ID first — see the README IMAP / SMTP