From ee2b20080b91c6998d8654dcbe16f675d4321daf Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 9 Apr 2024 10:30:41 +0930 Subject: [PATCH 1/2] Add Open URL accessibilityId --- .../org/thoughtcrime/securesms/onboarding/LandingActivity.kt | 2 +- app/src/main/res/values/strings.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/onboarding/LandingActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/onboarding/LandingActivity.kt index 8ce485a9b5..7d3a2b7be7 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/onboarding/LandingActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/onboarding/LandingActivity.kt @@ -111,7 +111,7 @@ class LandingActivity : BaseActionBarActivity() { modifier = Modifier .width(262.dp) .align(Alignment.CenterHorizontally), - contentDescription = GetString(R.string.AccessibilityId_privacy_policy_link), + contentDescription = GetString(R.string.AccessibilityId_open_url), fontSize = 11.sp, lineHeight = 13.sp ) { openDialog() } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 023f767d01..ad7d28a87e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1115,4 +1115,5 @@ Error message Hide recovery password button Confirm button + Open URL From 0512fd35007f9dcd8e68f16cf0cf138ef8a23226 Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 15 May 2024 11:08:45 +0930 Subject: [PATCH 2/2] Rename startPNModeActivity to startMessageNotificationsActivity --- .../org/thoughtcrime/securesms/onboarding/LoadingActivity.kt | 5 +++-- .../messagenotifications/MessageNotificationsActivity.kt | 3 +-- .../securesms/onboarding/pickname/PickDisplayNameActivity.kt | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/onboarding/LoadingActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/onboarding/LoadingActivity.kt index b37cdc16d7..af1b551631 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/onboarding/LoadingActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/onboarding/LoadingActivity.kt @@ -28,7 +28,8 @@ import org.session.libsession.utilities.TextSecurePreferences import org.thoughtcrime.securesms.ApplicationContext import org.thoughtcrime.securesms.BaseActionBarActivity import org.thoughtcrime.securesms.dependencies.ConfigFactory -import org.thoughtcrime.securesms.onboarding.messagenotifications.startPNModeActivity +import org.thoughtcrime.securesms.onboarding.messagenotifications.MessageNotificationsActivity +import org.thoughtcrime.securesms.onboarding.messagenotifications.startMessageNotificationsActivity import org.thoughtcrime.securesms.onboarding.pickname.startPickDisplayNameActivity import org.thoughtcrime.securesms.ui.AppTheme import org.thoughtcrime.securesms.ui.ProgressArc @@ -61,7 +62,7 @@ class LoadingActivity: BaseActionBarActivity() { when { skipped -> startPickDisplayNameActivity(true, flags) - else -> startPNModeActivity(flags) + else -> startMessageNotificationsActivity(flags) } } diff --git a/app/src/main/java/org/thoughtcrime/securesms/onboarding/messagenotifications/MessageNotificationsActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/onboarding/messagenotifications/MessageNotificationsActivity.kt index 71c1786e4c..aba66a4629 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/onboarding/messagenotifications/MessageNotificationsActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/onboarding/messagenotifications/MessageNotificationsActivity.kt @@ -38,7 +38,6 @@ import org.thoughtcrime.securesms.BaseActionBarActivity import org.thoughtcrime.securesms.home.HomeActivity import org.thoughtcrime.securesms.notifications.PushRegistry import org.thoughtcrime.securesms.ui.AppTheme -import org.thoughtcrime.securesms.ui.GetString import org.thoughtcrime.securesms.ui.OutlineButton import org.thoughtcrime.securesms.ui.PreviewTheme import org.thoughtcrime.securesms.ui.ThemeResPreviewParameterProvider @@ -166,7 +165,7 @@ fun NotificationRadioButton( } } -fun Context.startPNModeActivity(flags: Int = 0) { +fun Context.startMessageNotificationsActivity(flags: Int = 0) { Intent(this, MessageNotificationsActivity::class.java) .also { it.flags = flags } .also(::startActivity) diff --git a/app/src/main/java/org/thoughtcrime/securesms/onboarding/pickname/PickDisplayNameActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/onboarding/pickname/PickDisplayNameActivity.kt index e6a0993222..c83ecf2dcf 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/onboarding/pickname/PickDisplayNameActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/onboarding/pickname/PickDisplayNameActivity.kt @@ -34,7 +34,8 @@ import network.loki.messenger.R import org.session.libsession.utilities.AppTextSecurePreferences import org.thoughtcrime.securesms.ApplicationContext import org.thoughtcrime.securesms.BaseActionBarActivity -import org.thoughtcrime.securesms.onboarding.messagenotifications.startPNModeActivity +import org.thoughtcrime.securesms.onboarding.messagenotifications.MessageNotificationsActivity +import org.thoughtcrime.securesms.onboarding.messagenotifications.startMessageNotificationsActivity import org.thoughtcrime.securesms.ui.AppTheme import org.thoughtcrime.securesms.ui.OutlineButton import org.thoughtcrime.securesms.ui.PreviewTheme @@ -68,7 +69,7 @@ class PickDisplayNameActivity : BaseActionBarActivity() { lifecycleScope.launch { viewModel.eventFlow.collect { - startPNModeActivity() + startMessageNotificationsActivity() } } }