Remove the "Sign in with Google" account-setup option

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 <noreply@anthropic.com>
This commit is contained in:
2026-06-27 20:55:15 -05:00
co-authored by Claude Opus 4.8
parent 3d93f76fc1
commit f0b4ee6f57
2 changed files with 0 additions and 24 deletions
@@ -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,
-2
View File
@@ -67,11 +67,9 @@
<string name="attachment_no_app">No app can open this file</string>
<!-- Account setup -->
<string name="account_setup_gmail">Sign in with Google</string>
<string name="account_setup_outlook">Sign in with Microsoft</string>
<string name="account_setup_other">Other (IMAP/SMTP)</string>
<string name="account_setup_subtitle">Choose how you want to connect your mailbox.</string>
<string name="account_gmail_needs_client_id">Add your Google OAuth client ID first — see the README</string>
<!-- Manual IMAP/SMTP setup -->
<string name="manual_setup_title">IMAP / SMTP</string>