TP-83250 | Narayan | Contact permission description configurability removal (#12495)
This commit is contained in:
committed by
GitHub
parent
e50c5ac7ec
commit
177b29bbec
@@ -140,7 +140,6 @@ 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"
|
||||
const val NAVI_PAY_PPS_SHARE_RECEIPT_CALLOUT_TEXT = "NAVI_PAY_PPS_SHARE_RECEIPT_CALLOUT_TEXT"
|
||||
const val NAVI_PAY_TDS_SHARE_RECEIPT_CALLOUT_TEXT = "NAVI_PAY_TDS_SHARE_RECEIPT_CALLOUT_TEXT"
|
||||
const val NAVI_PAY_SHARE_RECEIPT_CALLOUT_ENABLED_MAX_TIME =
|
||||
|
||||
@@ -379,8 +379,7 @@ fun PayToContactsScreen(
|
||||
clickedContactPhoneNumber = clickedContactPhoneNumber,
|
||||
showShimmer = showShimmer,
|
||||
newContact = newContact,
|
||||
shouldShowYourContactsTitle = shouldShowYourContactsTitle,
|
||||
contactPermissionDescription = payToContactsViewModel.contactPermissionDescription
|
||||
shouldShowYourContactsTitle = shouldShowYourContactsTitle
|
||||
)
|
||||
PayToContactsUIState.Search ->
|
||||
RenderPayToContactsSearchScreen(
|
||||
@@ -388,24 +387,24 @@ fun PayToContactsScreen(
|
||||
onSearchInputValueChange = {
|
||||
payToContactsViewModel.updateSearchQueryStringState(searchQuery = it)
|
||||
},
|
||||
frequentTransactions = frequentTransactions,
|
||||
onTrailingIconClicked = onTrailingIconClicked,
|
||||
onSearchBarBackClicked = onSearchBarBackClicked,
|
||||
contactList = contactList,
|
||||
onContactSelected = onContactSelected,
|
||||
onNewContactSelected = onNewContactSelected,
|
||||
bottomSheetState = bottomSheetState,
|
||||
onTrailingIconClicked = onTrailingIconClicked,
|
||||
onSearchBarBackClicked = onSearchBarBackClicked,
|
||||
isNewContactVisible = isNewContactVisible,
|
||||
onPrimaryButtonClicked = onAllowPermissionButtonClicked,
|
||||
frequentTransactions = frequentTransactions,
|
||||
frequentTransactionMaxColumns = payToContactsViewModel.getFrequentTxnsMaxColumns(),
|
||||
frequentTransactionsHeading = frequentTransactionsHeading,
|
||||
areAllPermissionsGranted = readContactsPermissionsState.allPermissionsGranted,
|
||||
onFrequentTransactionSelected = onFrequentTransactionSelected,
|
||||
hasNonZeroContacts = isContactListNonEmpty,
|
||||
bottomSheetUIState = bottomSheetStateHolder.bottomSheetUIState,
|
||||
onInvalidVpaBottomSheetCtaClicked = {
|
||||
payToContactsViewModel.updateBottomSheetUIState(showBottomSheet = false)
|
||||
},
|
||||
onFrequentTransactionSelected = onFrequentTransactionSelected,
|
||||
frequentTransactionMaxColumns = payToContactsViewModel.getFrequentTxnsMaxColumns(),
|
||||
frequentTransactionsHeading = frequentTransactionsHeading,
|
||||
areAllPermissionsGranted = readContactsPermissionsState.allPermissionsGranted,
|
||||
hasNonZeroContacts = isContactListNonEmpty,
|
||||
showLoader = showLoader,
|
||||
clickedContactPhoneNumber = clickedContactPhoneNumber,
|
||||
showShimmer = showShimmer,
|
||||
@@ -415,8 +414,7 @@ fun PayToContactsScreen(
|
||||
shouldShowYourContactsTitle = shouldShowYourContactsTitle,
|
||||
isSelfTransferCtaVisible = isSelfTransferCtaVisible,
|
||||
userPhoneNumber = payToContactsViewModel.userPhoneNumber,
|
||||
onSelfTransferClicked = onSelfTransferClicked,
|
||||
contactPermissionDescription = payToContactsViewModel.contactPermissionDescription
|
||||
onSelfTransferClicked = onSelfTransferClicked
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -451,8 +449,7 @@ fun RenderPayToContactsSearchScreen(
|
||||
shouldShowYourContactsTitle: Boolean,
|
||||
isSelfTransferCtaVisible: Boolean,
|
||||
userPhoneNumber: String = "",
|
||||
onSelfTransferClicked: () -> Unit,
|
||||
contactPermissionDescription: String
|
||||
onSelfTransferClicked: () -> Unit
|
||||
) {
|
||||
val scope = rememberCoroutineScope()
|
||||
val context = LocalContext.current
|
||||
@@ -551,27 +548,26 @@ fun RenderPayToContactsSearchScreen(
|
||||
isNewContactVisible = isNewContactVisible,
|
||||
contactList = contactList,
|
||||
onContactSelected = onContactSelected,
|
||||
onNewContactSelected = onNewContactSelected,
|
||||
onFrequentTransactionSelected = onFrequentTransactionSelected,
|
||||
frequentTransactionMaxColumns = frequentTransactionMaxColumns,
|
||||
frequentTransactionsHeading = frequentTransactionsHeading,
|
||||
areAllPermissionsGranted = areAllPermissionsGranted,
|
||||
onPrimaryButtonClicked = onPrimaryButtonClicked,
|
||||
isSearchState = true,
|
||||
onSearchBarClicked = {},
|
||||
navigationIcon = 0,
|
||||
onBackClick = {},
|
||||
rewardsNudgeDetailEntity = null,
|
||||
onSearchBarClicked = {},
|
||||
hasNonZeroContacts = hasNonZeroContacts,
|
||||
showLoader = showLoader,
|
||||
clickedContactPhoneNumber = clickedContactPhoneNumber,
|
||||
showShimmer = showShimmer,
|
||||
newContact = newContact,
|
||||
onNewContactSelected = onNewContactSelected,
|
||||
shouldShowYourContactsTitle = shouldShowYourContactsTitle,
|
||||
isSelfTransferCtaVisible = isSelfTransferCtaVisible,
|
||||
userPhoneNumber = userPhoneNumber,
|
||||
onSelfTransferClicked = onSelfTransferClicked,
|
||||
contactPermissionDescription = contactPermissionDescription
|
||||
isSelfTransferCtaVisible = isSelfTransferCtaVisible,
|
||||
onSelfTransferClicked = onSelfTransferClicked
|
||||
)
|
||||
}
|
||||
},
|
||||
@@ -604,8 +600,7 @@ fun RenderPayToContactsScreen(
|
||||
clickedContactPhoneNumber: String,
|
||||
showShimmer: Boolean = false,
|
||||
newContact: PhoneContactEntity?,
|
||||
shouldShowYourContactsTitle: Boolean,
|
||||
contactPermissionDescription: String
|
||||
shouldShowYourContactsTitle: Boolean
|
||||
) {
|
||||
|
||||
val scope = rememberCoroutineScope()
|
||||
@@ -641,24 +636,23 @@ fun RenderPayToContactsScreen(
|
||||
isNewContactVisible = isNewContactVisible,
|
||||
contactList = contactList,
|
||||
onContactSelected = onContactSelected,
|
||||
onNewContactSelected = onNewContactSelected,
|
||||
onFrequentTransactionSelected = onFrequentTransactionSelected,
|
||||
frequentTransactionMaxColumns = frequentTransactionMaxColumns,
|
||||
frequentTransactionsHeading = frequentTransactionsHeading,
|
||||
areAllPermissionsGranted = areAllPermissionsGranted,
|
||||
onPrimaryButtonClicked = onPrimaryButtonClicked,
|
||||
isSearchState = false,
|
||||
onSearchBarClicked = onSearchBarClicked,
|
||||
navigationIcon = CommonR.drawable.ic_arrow_left_black_v2,
|
||||
onBackClick = onBackClick,
|
||||
rewardsNudgeDetailEntity = rewardsNudgeDetailEntity,
|
||||
onSearchBarClicked = onSearchBarClicked,
|
||||
hasNonZeroContacts = hasNonZeroContacts,
|
||||
showLoader = showLoader,
|
||||
clickedContactPhoneNumber = clickedContactPhoneNumber,
|
||||
showShimmer = showShimmer,
|
||||
newContact = newContact,
|
||||
onNewContactSelected = onNewContactSelected,
|
||||
shouldShowYourContactsTitle = shouldShowYourContactsTitle,
|
||||
contactPermissionDescription = contactPermissionDescription
|
||||
shouldShowYourContactsTitle = shouldShowYourContactsTitle
|
||||
)
|
||||
},
|
||||
)
|
||||
@@ -715,8 +709,7 @@ private fun PayToContactScreenScaffoldContent(
|
||||
shouldShowYourContactsTitle: Boolean,
|
||||
userPhoneNumber: String = "",
|
||||
isSelfTransferCtaVisible: Boolean = false,
|
||||
onSelfTransferClicked: () -> Unit = {},
|
||||
contactPermissionDescription: String
|
||||
onSelfTransferClicked: () -> Unit = {}
|
||||
) {
|
||||
LazyColumn(modifier = modifier.fillMaxHeight(), flingBehavior = maxScrollFlingBehavior()) {
|
||||
if (!isSearchState) {
|
||||
@@ -821,12 +814,7 @@ private fun PayToContactScreenScaffoldContent(
|
||||
}
|
||||
}
|
||||
} else {
|
||||
item {
|
||||
PayToContactsPermissionView(
|
||||
onPrimaryButtonClicked = onPrimaryButtonClicked,
|
||||
contactPermissionDescription = contactPermissionDescription
|
||||
)
|
||||
}
|
||||
item { PayToContactsPermissionView(onPrimaryButtonClicked = onPrimaryButtonClicked) }
|
||||
}
|
||||
|
||||
if (!isSearchState) {
|
||||
@@ -1111,10 +1099,7 @@ private fun frequentTransactionItemDetail(frequentTransactionEntity: Transaction
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun PayToContactsPermissionView(
|
||||
onPrimaryButtonClicked: () -> Unit,
|
||||
contactPermissionDescription: String
|
||||
) {
|
||||
fun PayToContactsPermissionView(onPrimaryButtonClicked: () -> Unit) {
|
||||
Column(modifier = Modifier.fillMaxWidth(), verticalArrangement = Arrangement.Center) {
|
||||
NaviText(
|
||||
modifier = Modifier.padding(horizontal = 16.dp),
|
||||
@@ -1132,7 +1117,7 @@ fun PayToContactsPermissionView(
|
||||
iconId = CommonR.drawable.ic_phone_book_permission,
|
||||
iconSize = 72.dp,
|
||||
titleId = R.string.contact_permission_title,
|
||||
descriptionText = contactPermissionDescription,
|
||||
descriptionText = stringResource(R.string.contact_permission_des),
|
||||
buttonTextId = R.string.allow_permission,
|
||||
onPrimaryButtonClicked = onPrimaryButtonClicked
|
||||
)
|
||||
|
||||
@@ -180,14 +180,6 @@ constructor(
|
||||
MutableStateFlow(naviPayDefaultConfig.config.frequentTransactionHeading)
|
||||
val frequentTransactionsHeading = _frequentTransactionsHeading.asStateFlow()
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user