From accc48ea8a6f092716a99d2e21f3c6b95a7e9c37 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Fri, 10 Jul 2020 23:20:39 +0300 Subject: [PATCH] remove hard reference from MainAvtivity to AccountSummaryFragment not used --- .../ui/account_summary/AccountSummaryFragment.java | 3 +-- .../java/net/ktnx/mobileledger/ui/activity/MainActivity.java | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryFragment.java b/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryFragment.java index cdb2e59a..8ee910b5 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryFragment.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryFragment.java @@ -1,5 +1,5 @@ /* - * Copyright © 2019 Damyan Ivanov. + * Copyright © 2020 Damyan Ivanov. * This file is part of MoLe. * MoLe is free software: you can distribute it and/or modify it * under the term of the GNU General Public License as published by @@ -70,7 +70,6 @@ public class AccountSummaryFragment extends MobileLedgerListFragment { modelAdapter = new AccountSummaryAdapter(); - mActivity.mAccountSummaryFragment = this; root = mActivity.findViewById(R.id.account_root); LinearLayoutManager llm = new LinearLayoutManager(mActivity); llm.setOrientation(RecyclerView.VERTICAL); diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java index 091a58fe..8d9adfbe 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java @@ -91,7 +91,6 @@ public class MainActivity extends ProfileThemedActivity { public static final String BUNDLE_SAVED_STATE = "bundle_savedState"; public static final String STATE_ACC_FILTER = "account_filter"; private static final String PREF_THEME_ID = "themeId"; - public AccountSummaryFragment mAccountSummaryFragment; DrawerLayout drawer; private View profileListHeadMore, profileListHeadCancel, profileListHeadAddProfile; private View bTransactionListCancelDownload; @@ -757,7 +756,7 @@ public class MainActivity extends ProfileThemedActivity { switch (position) { case 0: // debug("flow", "Creating account summary fragment"); - return mAccountSummaryFragment = new AccountSummaryFragment(); + return new AccountSummaryFragment(); case 1: return new TransactionListFragment(); default: -- 2.39.5