2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-03 23:15:31 +00:00

For #19653 - Address 19643 PR comments

Rename handleAddCreditCard to handleAddCreditCardClicked
Rename onClickAddCreditCard to onAddCreditCardClick
Format layout_add_credit_card.xml
This commit is contained in:
Ionut Cristian Bedregeanu 2021-05-26 11:31:12 +03:00 committed by Mugurell
parent 272e631b62
commit ac71b47c61
6 changed files with 12 additions and 11 deletions

View File

@ -23,9 +23,9 @@ interface CreditCardsManagementController {
fun handleCreditCardClicked(creditCard: CreditCard)
/**
* @see [CreditCardsManagementInteractor.onClickAddCreditCard]
* @see [CreditCardsManagementInteractor.onAddCreditCardClick]
*/
fun handleAddCreditCard()
fun handleAddCreditCardClicked()
}
/**
@ -39,7 +39,7 @@ class DefaultCreditCardsManagementController(
navigateToCreditCardEditor(creditCard)
}
override fun handleAddCreditCard() {
override fun handleAddCreditCardClicked() {
navigateToCreditCardEditor()
}

View File

@ -24,7 +24,7 @@ interface CreditCardsManagementInteractor {
* Navigates to the credit card editor to add a new credit card. Called when a user
* taps on 'Add credit card' button.
*/
fun onClickAddCreditCard()
fun onAddCreditCardClick()
}
/**
@ -41,7 +41,7 @@ class DefaultCreditCardsManagementInteractor(
controller.handleCreditCardClicked(creditCard)
}
override fun onClickAddCreditCard() {
controller.handleAddCreditCard()
override fun onAddCreditCardClick() {
controller.handleAddCreditCardClicked()
}
}

View File

@ -32,7 +32,7 @@ class CreditCardsManagementView(
layoutManager = LinearLayoutManager(containerView.context)
}
add_credit_card_button.setOnClickListener { interactor.onClickAddCreditCard() }
add_credit_card_button.setOnClickListener { interactor.onAddCreditCardClick() }
}
/**

View File

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!-- This Source Code Form is subject to the terms of the Mozilla Public
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<androidx.constraintlayout.widget.ConstraintLayout

View File

@ -64,7 +64,7 @@ class DefaultCreditCardsManagementControllerTest {
@Test
fun handleAddCreditCardClicked() {
controller.handleAddCreditCard()
controller.handleAddCreditCardClicked()
verify {
navController.navigate(

View File

@ -32,7 +32,7 @@ class DefaultCreditCardsManagementInteractorTest {
@Test
fun onClickAddCreditCard() {
interactor.onClickAddCreditCard()
verify { controller.handleAddCreditCard() }
interactor.onAddCreditCardClick()
verify { controller.handleAddCreditCardClicked() }
}
}