From 2f649425841d97256bb035343ee7139825f13e19 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Mon, 27 Sep 2021 19:32:57 +0800 Subject: Enable subreddit multiselection in anonymous mode. --- .../activities/SubredditMultiselectionActivity.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'app/src/main/java') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SubredditMultiselectionActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SubredditMultiselectionActivity.java index f2d00212..a0b9acbb 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SubredditMultiselectionActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SubredditMultiselectionActivity.java @@ -12,7 +12,6 @@ import android.view.WindowManager; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; -import android.widget.Toast; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -81,7 +80,6 @@ public class SubredditMultiselectionActivity extends BaseActivity implements Act @Inject CustomThemeWrapper mCustomThemeWrapper; public SubscribedSubredditViewModel mSubscribedSubredditViewModel; - private String mAccessToken; private String mAccountName; private LinearLayoutManagerBugFixed mLinearLayoutManager; private SubredditMultiselectionRecyclerViewAdapter mAdapter; @@ -132,12 +130,8 @@ public class SubredditMultiselectionActivity extends BaseActivity implements Act mSwipeRefreshLayout.setEnabled(false); - mAccessToken = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCESS_TOKEN, null); - mAccountName = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCOUNT_NAME, null); - if (mAccessToken == null) { - Toast.makeText(this, R.string.logged_out, Toast.LENGTH_SHORT).show(); - finish(); - } + mAccountName = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCOUNT_NAME, "-"); + bindView(); } -- cgit v1.2.3