From b7d233b94d4c97ba23494145e246f10f57e32d8e Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Thu, 11 Mar 2021 11:34:14 -0500 Subject: [PATCH] fix #467? --- .../fragments/settings/MorePreferencesFragment.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/fragments/settings/MorePreferencesFragment.java b/app/src/main/java/awais/instagrabber/fragments/settings/MorePreferencesFragment.java index fce752e1..2b39f02b 100644 --- a/app/src/main/java/awais/instagrabber/fragments/settings/MorePreferencesFragment.java +++ b/app/src/main/java/awais/instagrabber/fragments/settings/MorePreferencesFragment.java @@ -45,10 +45,9 @@ import static awais.instagrabber.utils.Utils.settingsHelper; public class MorePreferencesFragment extends BasePreferencesFragment { private static final String TAG = "MorePreferencesFragment"; - private final AccountRepository accountRepository; + private AccountRepository accountRepository; public MorePreferencesFragment() { - accountRepository = AccountRepository.getInstance(AccountDataSource.getInstance(getContext())); } @Override @@ -58,6 +57,7 @@ public class MorePreferencesFragment extends BasePreferencesFragment { // screen.addPreference(new MoreHeaderPreference(getContext())); final Context context = getContext(); if (context == null) return; + accountRepository = AccountRepository.getInstance(AccountDataSource.getInstance(context)); final PreferenceCategory accountCategory = new PreferenceCategory(context); accountCategory.setTitle(R.string.account); accountCategory.setIconSpaceReserved(false);