Browse Source

fix #467?

renovate/org.robolectric-robolectric-4.x
Austin Huang 4 years ago
parent
commit
b7d233b94d
No known key found for this signature in database GPG Key ID: 84C23AA04587A91F
  1. 4
      app/src/main/java/awais/instagrabber/fragments/settings/MorePreferencesFragment.java

4
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 { public class MorePreferencesFragment extends BasePreferencesFragment {
private static final String TAG = "MorePreferencesFragment"; private static final String TAG = "MorePreferencesFragment";
private final AccountRepository accountRepository;
private AccountRepository accountRepository;
public MorePreferencesFragment() { public MorePreferencesFragment() {
accountRepository = AccountRepository.getInstance(AccountDataSource.getInstance(getContext()));
} }
@Override @Override
@ -58,6 +57,7 @@ public class MorePreferencesFragment extends BasePreferencesFragment {
// screen.addPreference(new MoreHeaderPreference(getContext())); // screen.addPreference(new MoreHeaderPreference(getContext()));
final Context context = getContext(); final Context context = getContext();
if (context == null) return; if (context == null) return;
accountRepository = AccountRepository.getInstance(AccountDataSource.getInstance(context));
final PreferenceCategory accountCategory = new PreferenceCategory(context); final PreferenceCategory accountCategory = new PreferenceCategory(context);
accountCategory.setTitle(R.string.account); accountCategory.setTitle(R.string.account);
accountCategory.setIconSpaceReserved(false); accountCategory.setIconSpaceReserved(false);

Loading…
Cancel
Save