TP-76420 | Narayan | Contact permission description change (#12007)
This commit is contained in:
committed by
GitHub
parent
d4a6eb8f66
commit
e8ea7d7384
@@ -142,6 +142,7 @@ object FirebaseRemoteConfigHelper {
|
||||
"NAVI_PAY_SCREENSHOT_SHARE_RECEIPT_ENABLED"
|
||||
const val NAVI_PAY_SCRATCH_CARD_OPTIMISATION_V2_ENABLED =
|
||||
"NAVI_PAY_SCRATCH_CARD_OPTIMISATION_V2_ENABLED"
|
||||
const val NAVI_PAY_CONTACT_PERMISSION_DESCRIPTION = "NAVI_PAY_CONTACT_PERMISSION_DESCRIPTION"
|
||||
|
||||
// PAYMENTS
|
||||
const val NAVI_PMT_JUSPAY_INIT_OPTIMISATION_DISABLE =
|
||||
|
||||
@@ -2684,7 +2684,7 @@ fun IconWithTitleDescriptionButton(
|
||||
modifier: Modifier,
|
||||
iconId: Int,
|
||||
titleId: Int,
|
||||
descriptionId: Int,
|
||||
descriptionText: String,
|
||||
buttonTextId: Int,
|
||||
onPrimaryButtonClicked: () -> Unit
|
||||
) {
|
||||
@@ -2705,7 +2705,7 @@ fun IconWithTitleDescriptionButton(
|
||||
)
|
||||
Spacer(modifier = Modifier.height(4.dp))
|
||||
NaviText(
|
||||
text = stringResource(id = descriptionId),
|
||||
text = descriptionText,
|
||||
color = NaviPayColor.textPrimary,
|
||||
fontSize = 14.sp,
|
||||
fontFamily = ttComposeFontFamily,
|
||||
|
||||
@@ -764,7 +764,7 @@ fun ScannerPermissionView(modifier: Modifier, onAllowPermissionButtonClick: () -
|
||||
modifier = Modifier.wrapContentSize(),
|
||||
iconId = R.drawable.ic_np_camera,
|
||||
titleId = R.string.allow_camera_access,
|
||||
descriptionId = R.string.allow_camera_access_desc,
|
||||
descriptionText = stringResource(id = R.string.allow_camera_access_desc),
|
||||
buttonTextId = R.string.allow_permission,
|
||||
onPrimaryButtonClicked = onAllowPermissionButtonClick
|
||||
)
|
||||
|
||||
@@ -381,7 +381,8 @@ fun PayToContactsScreenV2(
|
||||
clickedContactPhoneNumber = clickedContactPhoneNumber,
|
||||
showShimmer = showShimmer,
|
||||
newContact = newContact,
|
||||
shouldShowYourContactsTitle = shouldShowYourContactsTitle
|
||||
shouldShowYourContactsTitle = shouldShowYourContactsTitle,
|
||||
contactPermissionDescription = payToContactsViewModelV2.contactPermissionDescription
|
||||
)
|
||||
PayToContactsUIStateV2.Search ->
|
||||
RenderPayToContactsSearchScreen(
|
||||
@@ -417,7 +418,8 @@ fun PayToContactsScreenV2(
|
||||
shouldShowYourContactsTitle = shouldShowYourContactsTitle,
|
||||
isSelfTransferCtaVisible = isSelfTransferCtaVisible,
|
||||
userPhoneNumber = payToContactsViewModelV2.userPhoneNumber,
|
||||
onSelfTransferClicked = onSelfTransferClicked
|
||||
onSelfTransferClicked = onSelfTransferClicked,
|
||||
contactPermissionDescription = payToContactsViewModelV2.contactPermissionDescription
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -452,7 +454,8 @@ fun RenderPayToContactsSearchScreen(
|
||||
shouldShowYourContactsTitle: Boolean,
|
||||
isSelfTransferCtaVisible: Boolean,
|
||||
userPhoneNumber: String = "",
|
||||
onSelfTransferClicked: () -> Unit
|
||||
onSelfTransferClicked: () -> Unit,
|
||||
contactPermissionDescription: String
|
||||
) {
|
||||
val keyboard = LocalSoftwareKeyboardController.current
|
||||
|
||||
@@ -572,7 +575,8 @@ fun RenderPayToContactsSearchScreen(
|
||||
shouldShowYourContactsTitle = shouldShowYourContactsTitle,
|
||||
isSelfTransferCtaVisible = isSelfTransferCtaVisible,
|
||||
userPhoneNumber = userPhoneNumber,
|
||||
onSelfTransferClicked = onSelfTransferClicked
|
||||
onSelfTransferClicked = onSelfTransferClicked,
|
||||
contactPermissionDescription = contactPermissionDescription
|
||||
)
|
||||
}
|
||||
},
|
||||
@@ -605,7 +609,8 @@ fun RenderPayToContactsScreen(
|
||||
clickedContactPhoneNumber: String,
|
||||
showShimmer: Boolean = false,
|
||||
newContact: PhoneContactEntity?,
|
||||
shouldShowYourContactsTitle: Boolean
|
||||
shouldShowYourContactsTitle: Boolean,
|
||||
contactPermissionDescription: String
|
||||
) {
|
||||
|
||||
val scope = rememberCoroutineScope()
|
||||
@@ -657,7 +662,8 @@ fun RenderPayToContactsScreen(
|
||||
showShimmer = showShimmer,
|
||||
newContact = newContact,
|
||||
onNewContactSelected = onNewContactSelected,
|
||||
shouldShowYourContactsTitle = shouldShowYourContactsTitle
|
||||
shouldShowYourContactsTitle = shouldShowYourContactsTitle,
|
||||
contactPermissionDescription = contactPermissionDescription
|
||||
)
|
||||
},
|
||||
)
|
||||
@@ -714,7 +720,8 @@ private fun PayToContactScreenScaffoldContent(
|
||||
shouldShowYourContactsTitle: Boolean,
|
||||
userPhoneNumber: String = "",
|
||||
isSelfTransferCtaVisible: Boolean = false,
|
||||
onSelfTransferClicked: () -> Unit = {}
|
||||
onSelfTransferClicked: () -> Unit = {},
|
||||
contactPermissionDescription: String
|
||||
) {
|
||||
LazyColumn(modifier = modifier.fillMaxHeight(), flingBehavior = maxScrollFlingBehavior()) {
|
||||
if (!isSearchState) {
|
||||
@@ -819,7 +826,12 @@ private fun PayToContactScreenScaffoldContent(
|
||||
}
|
||||
}
|
||||
} else {
|
||||
item { PayToContactsPermissionView(onPrimaryButtonClicked = onPrimaryButtonClicked) }
|
||||
item {
|
||||
PayToContactsPermissionView(
|
||||
onPrimaryButtonClicked = onPrimaryButtonClicked,
|
||||
contactPermissionDescription = contactPermissionDescription
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
if (!isSearchState) {
|
||||
@@ -1104,7 +1116,10 @@ private fun frequentTransactionItemDetail(frequentTransactionEntity: Transaction
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun PayToContactsPermissionView(onPrimaryButtonClicked: () -> Unit) {
|
||||
fun PayToContactsPermissionView(
|
||||
onPrimaryButtonClicked: () -> Unit,
|
||||
contactPermissionDescription: String
|
||||
) {
|
||||
Column(modifier = Modifier.fillMaxWidth(), verticalArrangement = Arrangement.Center) {
|
||||
NaviText(
|
||||
modifier = Modifier.padding(horizontal = 16.dp),
|
||||
@@ -1121,7 +1136,7 @@ fun PayToContactsPermissionView(onPrimaryButtonClicked: () -> Unit) {
|
||||
modifier = Modifier.padding(horizontal = 40.dp, vertical = 24.dp).wrapContentSize(),
|
||||
iconId = R.drawable.ic_np_phone_book,
|
||||
titleId = R.string.contact_permission_title,
|
||||
descriptionId = R.string.contact_permission_des,
|
||||
descriptionText = contactPermissionDescription,
|
||||
buttonTextId = R.string.allow_permission,
|
||||
onPrimaryButtonClicked = onPrimaryButtonClicked
|
||||
)
|
||||
|
||||
@@ -174,6 +174,14 @@ constructor(
|
||||
val frequentTransactionsHeading =
|
||||
MutableStateFlow(naviPayDefaultConfig.config.frequentTransactionHeading)
|
||||
|
||||
val contactPermissionDescription =
|
||||
FirebaseRemoteConfigHelper.getString(
|
||||
FirebaseRemoteConfigHelper.NAVI_PAY_CONTACT_PERMISSION_DESCRIPTION
|
||||
)
|
||||
.ifEmpty {
|
||||
resourceProvider.getString(R.string.contact_permission_des)
|
||||
} // TODO : Remove this after a few releases
|
||||
|
||||
private var apiCallJob: Job? = null
|
||||
|
||||
private var paymentJob: Job? = null
|
||||
|
||||
@@ -232,7 +232,7 @@
|
||||
<string name="contact">Contacts</string>
|
||||
<string name="contact_permission_description">To allow UPI payments to your contacts.</string>
|
||||
<string name="contact_permission_title">Allow contact permission</string>
|
||||
<string name="contact_permission_des">By giving permission, you can transfer money to your friends & family and earn rewards!</string>
|
||||
<string name="contact_permission_des">We collect this data so you can transfer money to your friends and family and earn rewards!</string>
|
||||
<string name="empty_contacts_list_description">You have no contacts in your phone</string>
|
||||
<string name="navi_pay_qr_error_title">Invalid QR code</string>
|
||||
<string name="navi_pay_qr_error_description">The QR code you scanned is not a valid UPI QR code</string>
|
||||
|
||||
Reference in New Issue
Block a user