From 1612db86c8686bda5cc0ba9f3a3369b6fe1dd144 Mon Sep 17 00:00:00 2001 From: Roger Yang Date: Fri, 6 Aug 2021 13:22:43 -0400 Subject: [PATCH] [fenix] Closes https://github.com/mozilla-mobile/fenix/issues/20723: Fix credit card management fragment binding --- .../creditcards/CreditCardsManagementFragment.kt | 2 +- .../creditcards/view/CreditCardsManagementView.kt | 3 --- app/src/main/res/layout/fragment_saved_cards.xml | 11 ----------- 3 files changed, 1 insertion(+), 15 deletions(-) delete mode 100644 app/src/main/res/layout/fragment_saved_cards.xml diff --git a/app/src/main/java/org/mozilla/fenix/settings/creditcards/CreditCardsManagementFragment.kt b/app/src/main/java/org/mozilla/fenix/settings/creditcards/CreditCardsManagementFragment.kt index 5d420e2fc6..183e0671d0 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/creditcards/CreditCardsManagementFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/creditcards/CreditCardsManagementFragment.kt @@ -40,7 +40,7 @@ class CreditCardsManagementFragment : SecureFragment() { container: ViewGroup?, savedInstanceState: Bundle? ): View? { - val view = inflater.inflate(R.layout.fragment_saved_cards, container, false) + val view = inflater.inflate(CreditCardsManagementView.LAYOUT_ID, container, false) creditCardsStore = StoreProvider.get(this) { CreditCardsFragmentStore(CreditCardsListState(creditCards = emptyList())) diff --git a/app/src/main/java/org/mozilla/fenix/settings/creditcards/view/CreditCardsManagementView.kt b/app/src/main/java/org/mozilla/fenix/settings/creditcards/view/CreditCardsManagementView.kt index 403b676a13..77e801cba8 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/creditcards/view/CreditCardsManagementView.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/creditcards/view/CreditCardsManagementView.kt @@ -4,7 +4,6 @@ package org.mozilla.fenix.settings.creditcards.view -import android.view.LayoutInflater import androidx.core.view.isVisible import androidx.recyclerview.widget.LinearLayoutManager import org.mozilla.fenix.R @@ -23,8 +22,6 @@ class CreditCardsManagementView( private val creditCardsAdapter = CreditCardsAdapter(interactor) init { - LayoutInflater.from(binding.root.context).inflate(LAYOUT_ID, binding.root, true) - binding.creditCardsList.apply { adapter = creditCardsAdapter layoutManager = LinearLayoutManager(binding.root.context) diff --git a/app/src/main/res/layout/fragment_saved_cards.xml b/app/src/main/res/layout/fragment_saved_cards.xml deleted file mode 100644 index d0cee56d7d..0000000000 --- a/app/src/main/res/layout/fragment_saved_cards.xml +++ /dev/null @@ -1,11 +0,0 @@ - - -