Hide visibility option when creating or editing anonymous multireddit.

This commit is contained in:
Alex Ning 2021-09-28 21:17:49 +08:00
parent 1896b971cd
commit f5f6213733
2 changed files with 8 additions and 0 deletions

View File

@ -111,6 +111,10 @@ public class CreateMultiRedditActivity extends BaseActivity {
mAccessToken = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCESS_TOKEN, null); mAccessToken = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCESS_TOKEN, null);
mAccountName = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCOUNT_NAME, "-"); mAccountName = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCOUNT_NAME, "-");
if (mAccessToken == null) {
visibilityLinearLayout.setVisibility(View.GONE);
}
if (savedInstanceState != null) { if (savedInstanceState != null) {
mSubreddits = savedInstanceState.getStringArrayList(SELECTED_SUBREDDITS_STATE); mSubreddits = savedInstanceState.getStringArrayList(SELECTED_SUBREDDITS_STATE);
} else { } else {

View File

@ -120,6 +120,10 @@ public class EditMultiRedditActivity extends BaseActivity {
mAccessToken = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCESS_TOKEN, null); mAccessToken = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCESS_TOKEN, null);
mAccountName = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCOUNT_NAME, "-"); mAccountName = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCOUNT_NAME, "-");
if (mAccessToken == null) {
visibilityLinearLayout.setVisibility(View.GONE);
}
if (savedInstanceState != null) { if (savedInstanceState != null) {
multiReddit = savedInstanceState.getParcelable(MULTI_REDDIT_STATE); multiReddit = savedInstanceState.getParcelable(MULTI_REDDIT_STATE);
multipath = savedInstanceState.getString(MULTI_PATH_STATE); multipath = savedInstanceState.getString(MULTI_PATH_STATE);