mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 13:08:46 +00:00
Add proper pending bank transfer urls.
This commit is contained in:
committed by
Cody Henthorne
parent
ab928be1b3
commit
7e68050e0a
@@ -18,6 +18,7 @@ import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
@@ -33,6 +34,7 @@ import org.thoughtcrime.securesms.badges.models.Badge
|
||||
import org.thoughtcrime.securesms.components.settings.app.AppSettingsActivity
|
||||
import org.thoughtcrime.securesms.components.settings.app.subscription.donate.DonateToSignalType
|
||||
import org.thoughtcrime.securesms.compose.ComposeBottomSheetDialogFragment
|
||||
import org.thoughtcrime.securesms.util.CommunicationActions
|
||||
import org.thoughtcrime.securesms.util.SpanUtil
|
||||
|
||||
/**
|
||||
@@ -122,12 +124,13 @@ private fun DonationPendingBottomSheetContent(
|
||||
modifier = Modifier.padding(bottom = 20.dp)
|
||||
)
|
||||
|
||||
val context = LocalContext.current
|
||||
val learnMore = stringResource(id = R.string.DonationPendingBottomSheet__learn_more)
|
||||
val fullString = stringResource(id = R.string.DonationPendingBottomSheet__bank_transfers_usually_take, learnMore)
|
||||
val spanned = SpanUtil.urlSubsequence(fullString, learnMore, "") // TODO [sepa] URL
|
||||
val spanned = SpanUtil.urlSubsequence(fullString, learnMore, stringResource(id = R.string.pending_transfer_url))
|
||||
Texts.LinkifiedText(
|
||||
textWithUrlSpans = spanned,
|
||||
onUrlClick = {}, // TODO [sepa] URL
|
||||
onUrlClick = { CommunicationActions.openBrowserLink(context, it) },
|
||||
style = LocalTextStyle.current.copy(textAlign = TextAlign.Center, color = MaterialTheme.colorScheme.onSurfaceVariant),
|
||||
modifier = Modifier.padding(bottom = 48.dp)
|
||||
)
|
||||
|
||||
@@ -28,6 +28,7 @@ import org.thoughtcrime.securesms.help.HelpFragment
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore
|
||||
import org.thoughtcrime.securesms.payments.FiatMoneyUtil
|
||||
import org.thoughtcrime.securesms.subscription.Subscription
|
||||
import org.thoughtcrime.securesms.util.CommunicationActions
|
||||
import org.thoughtcrime.securesms.util.Material3OnScrollHelper
|
||||
import org.thoughtcrime.securesms.util.SpanUtil
|
||||
import org.thoughtcrime.securesms.util.adapter.mapping.MappingAdapter
|
||||
@@ -303,7 +304,10 @@ class ManageDonationsFragment :
|
||||
)
|
||||
.setPositiveButton(android.R.string.ok) { _, _ -> }
|
||||
.setNegativeButton(R.string.MySupportPreference__learn_more) { _, _ ->
|
||||
// TODO [sepa] Where this go?
|
||||
CommunicationActions.openBrowserLink(
|
||||
requireContext(),
|
||||
getString(R.string.pending_transfer_url)
|
||||
)
|
||||
}
|
||||
.show()
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<string name="signal_me_username_url" translatable="false">https://signal.me/#u/%1$s</string>
|
||||
<string name="username_support_url" translatable="false">https://support.signal.org/hc/articles/5389476324250</string>
|
||||
<string name="export_account_data_url" translatable="false">https://support.signal.org/hc/articles/5538911756954</string>
|
||||
<string name="pending_transfer_url" translatable="false">https://support.signal.org/hc/articles/360031949872#pending</string>
|
||||
|
||||
<string name="yes">Yes</string>
|
||||
<string name="no">No</string>
|
||||
|
||||
Reference in New Issue
Block a user