]> git.ktnx.net Git - mobile-ledger.git/commitdiff
remove hard reference from MainAvtivity to AccountSummaryFragment
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 10 Jul 2020 20:20:39 +0000 (23:20 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 10 Jul 2020 20:20:39 +0000 (23:20 +0300)
not used

app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryFragment.java
app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java

index cdb2e59a56f5a960d9007236186573c5eeb3d70b..8ee910b54fe33b4c33655cc771fc18cd8d0fb167 100644 (file)
@@ -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);
index 091a58fe097cd2f44d6e2ee14ddd70a2af2eb990..8d9adfbed658011bf0aa73066fd671a4898f21cb 100644 (file)
@@ -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: