diff options
author | Alex Ning <chineseperson5@gmail.com> | 2021-09-28 13:17:49 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2021-09-28 13:17:49 +0000 |
commit | f5f6213733a0d7e5d4351c8454c657c1d7475603 (patch) | |
tree | 6f608f871077e145bfc3a7efac9f83d7ca584c18 /app/src/main/java | |
parent | 1896b971cd2e7ea373ed2f333859e093901b9d9c (diff) | |
download | infinity-for-reddit-f5f6213733a0d7e5d4351c8454c657c1d7475603.tar infinity-for-reddit-f5f6213733a0d7e5d4351c8454c657c1d7475603.tar.gz infinity-for-reddit-f5f6213733a0d7e5d4351c8454c657c1d7475603.tar.bz2 infinity-for-reddit-f5f6213733a0d7e5d4351c8454c657c1d7475603.tar.lz infinity-for-reddit-f5f6213733a0d7e5d4351c8454c657c1d7475603.tar.xz infinity-for-reddit-f5f6213733a0d7e5d4351c8454c657c1d7475603.tar.zst infinity-for-reddit-f5f6213733a0d7e5d4351c8454c657c1d7475603.zip |
Hide visibility option when creating or editing anonymous multireddit.
Diffstat (limited to '')
2 files changed, 8 insertions, 0 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CreateMultiRedditActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CreateMultiRedditActivity.java index 55b17e77..c586c1da 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CreateMultiRedditActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CreateMultiRedditActivity.java @@ -111,6 +111,10 @@ public class CreateMultiRedditActivity extends BaseActivity { mAccessToken = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCESS_TOKEN, null); mAccountName = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCOUNT_NAME, "-"); + if (mAccessToken == null) { + visibilityLinearLayout.setVisibility(View.GONE); + } + if (savedInstanceState != null) { mSubreddits = savedInstanceState.getStringArrayList(SELECTED_SUBREDDITS_STATE); } else { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/EditMultiRedditActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/EditMultiRedditActivity.java index 46668abe..eb559f1c 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/EditMultiRedditActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/EditMultiRedditActivity.java @@ -120,6 +120,10 @@ public class EditMultiRedditActivity extends BaseActivity { mAccessToken = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCESS_TOKEN, null); mAccountName = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCOUNT_NAME, "-"); + if (mAccessToken == null) { + visibilityLinearLayout.setVisibility(View.GONE); + } + if (savedInstanceState != null) { multiReddit = savedInstanceState.getParcelable(MULTI_REDDIT_STATE); multipath = savedInstanceState.getString(MULTI_PATH_STATE); |