diff options
author | Alex Ning <chineseperson5@gmail.com> | 2021-10-16 06:50:18 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2021-10-16 06:50:18 +0000 |
commit | 4395384586923940c2aba15cb467a5a7f80fe606 (patch) | |
tree | b558829bdf07de23490e454169ed198ecd9caf3e /app/src/main | |
parent | 1d7fbe3a993da8cc1ce5c64dc1cf29bf1659e005 (diff) | |
download | infinity-for-reddit-4395384586923940c2aba15cb467a5a7f80fe606.tar infinity-for-reddit-4395384586923940c2aba15cb467a5a7f80fe606.tar.gz infinity-for-reddit-4395384586923940c2aba15cb467a5a7f80fe606.tar.bz2 infinity-for-reddit-4395384586923940c2aba15cb467a5a7f80fe606.tar.lz infinity-for-reddit-4395384586923940c2aba15cb467a5a7f80fe606.tar.xz infinity-for-reddit-4395384586923940c2aba15cb467a5a7f80fe606.tar.zst infinity-for-reddit-4395384586923940c2aba15cb467a5a7f80fe606.zip |
Fix no multireddits found in MultiredditSelectionActivity in anonymous mode. Do not sync multireddits in anonymous mode in MultiredditSelectionActivity.
Diffstat (limited to 'app/src/main')
3 files changed, 5 insertions, 3 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/MultiredditSelectionActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/MultiredditSelectionActivity.java index d5ae4f84..7b1596f8 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/MultiredditSelectionActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/MultiredditSelectionActivity.java @@ -150,7 +150,9 @@ public class MultiredditSelectionActivity extends BaseActivity implements Activi return; } - loadMultiReddits(); + if (mAccessToken != null) { + loadMultiReddits(); + } if (initializeFragment) { mFragment = new MultiRedditListingFragment(); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SubscribedThingListingActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SubscribedThingListingActivity.java index d4c4caee..de5438e1 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SubscribedThingListingActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SubscribedThingListingActivity.java @@ -398,7 +398,7 @@ public class SubscribedThingListingActivity extends BaseActivity implements Acti SubscribedSubredditsListingFragment fragment = new SubscribedSubredditsListingFragment(); Bundle bundle = new Bundle(); bundle.putBoolean(SubscribedSubredditsListingFragment.EXTRA_IS_SUBREDDIT_SELECTION, false); - bundle.putString(SubscribedSubredditsListingFragment.EXTRA_ACCOUNT_NAME, mAccountName == null ? "-" : mAccountName); + bundle.putString(SubscribedSubredditsListingFragment.EXTRA_ACCOUNT_NAME, mAccountName); bundle.putString(SubscribedSubredditsListingFragment.EXTRA_ACCESS_TOKEN, mAccessToken); fragment.setArguments(bundle); return fragment; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/MultiRedditListingFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/MultiRedditListingFragment.java index c6ff0b85..302b0ea0 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/MultiRedditListingFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/MultiRedditListingFragment.java @@ -108,7 +108,7 @@ public class MultiRedditListingFragment extends Fragment implements FragmentComm } } - String accountName = getArguments().getString(EXTRA_ACCOUNT_NAME); + String accountName = getArguments().getString(EXTRA_ACCOUNT_NAME, "-"); String accessToken = getArguments().getString(EXTRA_ACCESS_TOKEN); boolean isGettingMultiredditInfo = getArguments().getBoolean(EXTRA_IS_GETTING_MULTIREDDIT_INFO, false); |