From 2595c587272ec61953ca35f94e81943dc6c7b76c Mon Sep 17 00:00:00 2001 From: Brandon McAnsh Date: Sun, 4 Oct 2026 20:22:48 -0400 Subject: [PATCH] fix(chat): show the external link warning as an info dialog Retitle it "You're Leaving Flipcash" and change the body to "This will open . Never share your Access Key with a website". The dialog moves from the red alert style to info, with Open Website as the primary button and Cancel as the secondary. --- .../com/flipcash/app/core/links/ExternalLinks.kt | 15 +++++---------- .../flipcash/core/src/main/res/values/strings.xml | 6 +++--- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/apps/flipcash/core/src/main/kotlin/com/flipcash/app/core/links/ExternalLinks.kt b/apps/flipcash/core/src/main/kotlin/com/flipcash/app/core/links/ExternalLinks.kt index eb4c4dbb1d..c426d1c8af 100644 --- a/apps/flipcash/core/src/main/kotlin/com/flipcash/app/core/links/ExternalLinks.kt +++ b/apps/flipcash/core/src/main/kotlin/com/flipcash/app/core/links/ExternalLinks.kt @@ -5,7 +5,6 @@ import androidx.compose.ui.platform.UriHandler import com.flipcash.core.R import com.getcode.manager.BottomBarAction import com.getcode.manager.BottomBarManager -import com.getcode.util.resources.R as ResourcesR import java.net.IDN /** @@ -95,8 +94,8 @@ private fun asciiHost(host: String): String { } /** - * Runs [open] straight away for a first-party link, and otherwise asks first: "You're leaving - * Flipcash", naming the host, with Cancel as the primary button and Open Link as the secondary. + * Runs [open] straight away for a first-party link, and otherwise asks first: "You're Leaving + * Flipcash", naming the host, with Open Website as the primary button and Cancel as the secondary. * * Only for links someone else wrote, such as a chat message. A link the app opens on purpose * (terms, a token's socials) goes straight to the browser. @@ -104,20 +103,16 @@ private fun asciiHost(host: String): String { fun openWithExternalLinkCheck(context: Context, url: String, open: () -> Unit) { when (val destination = classifyLink(url)) { LinkDestination.FirstParty -> open() - is LinkDestination.External -> BottomBarManager.showAlert( + is LinkDestination.External -> BottomBarManager.showInfo( title = context.getString(R.string.prompt_title_externalLink), message = context.getString(R.string.prompt_description_externalLink, destination.host), actions = listOf( BottomBarAction( - text = context.getString(ResourcesR.string.action_cancel), - style = BottomBarManager.BottomBarButtonStyle.Filled, - ), - BottomBarAction( - text = context.getString(R.string.action_openLink), - style = BottomBarManager.BottomBarButtonStyle.Text, + text = context.getString(R.string.action_openWebsite), onClick = open, ), ), + showCancel = true, ) } } diff --git a/apps/flipcash/core/src/main/res/values/strings.xml b/apps/flipcash/core/src/main/res/values/strings.xml index ca157dad19..cb59f04641 100644 --- a/apps/flipcash/core/src/main/res/values/strings.xml +++ b/apps/flipcash/core/src/main/res/values/strings.xml @@ -394,10 +394,10 @@ No social accounts linked Unlink Account? This social account will be removed from your profile. - You\'re leaving Flipcash + You\'re Leaving Flipcash - This link opens %1$s. Flipcash will never ask for your Access Key on a website - Open Link + This will open %1$s. Never share your Access Key with a website + Open Website Unlink Account Verify Your Phone Number And Email To Continue