From 159589b188d8dccbee22f401a93aa08994cdaad7 Mon Sep 17 00:00:00 2001 From: Gothwad Tech Date: Fri, 4 Dec 2026 11:10:21 +0000 Subject: [PATCH] =?UTF-8?q?fix(ui):=20repair=20main=20=E2=80=94=20move=20t?= =?UTF-8?q?he=20sign-in=20dialog=20out=20of=20the=20safe-browsing=20block?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #36 merged its first commit (a3e0928), which nested the AlertDialog inside safeBrowsingWarning?.let and never collected viewModel.signInError. main has failed the Quality Gate since. This applies the correction that was pushed after the merge: the dialog sits after the safe-browsing block, the state is collected next to the other lifecycle values, and SafeBrowsingDialog is untouched. --- .../java/com/bansify/browser/ui/BrowserApp.kt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/app/src/main/java/com/bansify/browser/ui/BrowserApp.kt b/app/src/main/java/com/bansify/browser/ui/BrowserApp.kt index 7b0c92f..d9feb89 100644 --- a/app/src/main/java/com/bansify/browser/ui/BrowserApp.kt +++ b/app/src/main/java/com/bansify/browser/ui/BrowserApp.kt @@ -117,6 +117,7 @@ import java.util.Locale fun BrowserApp(viewModel: BrowserViewModel) { val context = LocalContext.current val settings by viewModel.settings.collectAsStateWithLifecycle() + val signInError by viewModel.signInError.collectAsStateWithLifecycle() val accountState by viewModel.accountState.collectAsStateWithLifecycle() val tabs by viewModel.tabs.collectAsStateWithLifecycle() val activeTab by viewModel.activeTab.collectAsStateWithLifecycle() @@ -793,6 +794,24 @@ fun BrowserApp(viewModel: BrowserViewModel) { ) } + signInError?.let { detail -> + AlertDialog( + onDismissRequest = { viewModel.dismissSignInError() }, + title = { Text("Bansify sign-in failed") }, + text = { + Text( + detail + "\n\nApp " + com.bansify.browser.BuildConfig.VERSION_NAME + ) + }, + confirmButton = { + TextButton(onClick = { viewModel.dismissSignInError() }) { + Text("Close") + } + } + ) + } + + // Root-aligned Chrome 3-Dot Floating Overflow Menu ChromeOverflowMenu( expanded = overflowMenuExpanded,