diff options
Diffstat (limited to 'app/src/main/java')
3 files changed, 10 insertions, 1 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/MainActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/MainActivity.java index 38cf5cc0..4e2a53d2 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/MainActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/MainActivity.java @@ -176,7 +176,6 @@ public class MainActivity extends AppCompatActivity implements SortTypeBottomShe ButterKnife.bind(this); - EventBus.getDefault().register(this); getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewSubredditDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewSubredditDetailActivity.java index f567349f..d6b4fbb9 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewSubredditDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewSubredditDetailActivity.java @@ -381,6 +381,11 @@ public class ViewSubredditDetailActivity extends AppCompatActivity implements So } subscribeSubredditChip.setOnClickListener(view -> { + if(mAccessToken == null) { + Toast.makeText(ViewSubredditDetailActivity.this, R.string.login_first, Toast.LENGTH_SHORT).show(); + return; + } + if(subscriptionReady) { subscriptionReady = false; if(subscribeSubredditChip.getText().equals(getResources().getString(R.string.subscribe))) { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewUserDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewUserDetailActivity.java index d57e57f8..805c5af5 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewUserDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewUserDetailActivity.java @@ -311,6 +311,11 @@ public class ViewUserDetailActivity extends AppCompatActivity implements UserThi if (userData.isCanBeFollowed()) { subscribeUserChip.setVisibility(View.VISIBLE); subscribeUserChip.setOnClickListener(view -> { + if(mAccessToken == null) { + Toast.makeText(ViewUserDetailActivity.this, R.string.login_first, Toast.LENGTH_SHORT).show(); + return; + } + if (subscriptionReady) { subscriptionReady = false; if (subscribeUserChip.getText().equals(resources.getString(R.string.follow))) { |