diff options
author | Alex Ning <chineseperson5@gmail.com> | 2019-08-26 12:16:40 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2019-08-26 12:16:40 +0000 |
commit | 9469ecc611a6be16ae0c7fe60e8704574675c3cb (patch) | |
tree | 6fc76627e646eefb91e89db175f074703de68f4f /app/src/main/java | |
parent | 2a356aa12e67954043cf72732719bc2093e1fc6e (diff) | |
download | infinity-for-reddit-9469ecc611a6be16ae0c7fe60e8704574675c3cb.tar infinity-for-reddit-9469ecc611a6be16ae0c7fe60e8704574675c3cb.tar.gz infinity-for-reddit-9469ecc611a6be16ae0c7fe60e8704574675c3cb.tar.bz2 infinity-for-reddit-9469ecc611a6be16ae0c7fe60e8704574675c3cb.tar.lz infinity-for-reddit-9469ecc611a6be16ae0c7fe60e8704574675c3cb.tar.xz infinity-for-reddit-9469ecc611a6be16ae0c7fe60e8704574675c3cb.tar.zst infinity-for-reddit-9469ecc611a6be16ae0c7fe60e8704574675c3cb.zip |
Don't start lazy mode when refreshing posts in PostFragment. Minor bugs fixed.
Diffstat (limited to 'app/src/main/java')
6 files changed, 16 insertions, 7 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/PostFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/PostFragment.java index b9275e62..7420893e 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/PostFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/PostFragment.java @@ -406,6 +406,8 @@ public class PostFragment extends Fragment implements FragmentCommunicator { if(isInLazyMode) { stopLazyMode(); } + + hasPost = false; mPostViewModel.refresh(); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/PostImageActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/PostImageActivity.java index 6e52811c..ca684b35 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/PostImageActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/PostImageActivity.java @@ -227,7 +227,9 @@ public class PostImageActivity extends AppCompatActivity implements FlairBottomS isPosting = false; if(getIntent().hasExtra(EXTRA_SUBREDDIT_NAME)) { - subredditName = getIntent().getExtras().getString(EXTRA_SUBREDDIT_NAME); + loadSubredditIconSuccessful = false; + subredditName = getIntent().getStringExtra(EXTRA_SUBREDDIT_NAME); + subredditSelected = true; subredditNameTextView.setTextColor(getResources().getColor(R.color.primaryTextColor)); subredditNameTextView.setText(subredditName); loadSubredditIcon(); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/PostLinkActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/PostLinkActivity.java index faa7769c..415929c4 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/PostLinkActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/PostLinkActivity.java @@ -197,7 +197,9 @@ public class PostLinkActivity extends AppCompatActivity implements FlairBottomSh isPosting = false; if(getIntent().hasExtra(EXTRA_SUBREDDIT_NAME)) { - subredditName = getIntent().getExtras().getString(EXTRA_SUBREDDIT_NAME); + loadSubredditIconSuccessful = false; + subredditName = getIntent().getStringExtra(EXTRA_SUBREDDIT_NAME); + subredditSelected = true; subredditNameTextView.setTextColor(getResources().getColor(R.color.primaryTextColor)); subredditNameTextView.setText(subredditName); flairTextView.setVisibility(View.VISIBLE); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/PostTextActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/PostTextActivity.java index 1d34d6fa..79e22955 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/PostTextActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/PostTextActivity.java @@ -198,7 +198,8 @@ public class PostTextActivity extends AppCompatActivity implements FlairBottomSh if(getIntent().hasExtra(EXTRA_SUBREDDIT_NAME)) { loadSubredditIconSuccessful = false; - subredditName = getIntent().getExtras().getString(EXTRA_SUBREDDIT_NAME); + subredditName = getIntent().getStringExtra(EXTRA_SUBREDDIT_NAME); + subredditSelected = true; subredditNameTextView.setTextColor(getResources().getColor(R.color.primaryTextColor)); subredditNameTextView.setText(subredditName); flairTextView.setVisibility(View.VISIBLE); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/PostVideoActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/PostVideoActivity.java index bfdb0a21..92bef7e7 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/PostVideoActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/PostVideoActivity.java @@ -225,7 +225,9 @@ public class PostVideoActivity extends AppCompatActivity implements FlairBottomS isPosting = false; if(getIntent().hasExtra(EXTRA_SUBREDDIT_NAME)) { - subredditName = getIntent().getExtras().getString(EXTRA_SUBREDDIT_NAME); + loadSubredditIconSuccessful = false; + subredditName = getIntent().getStringExtra(EXTRA_SUBREDDIT_NAME); + subredditSelected = true; subredditNameTextView.setTextColor(getResources().getColor(R.color.primaryTextColor)); subredditNameTextView.setText(subredditName); loadSubredditIcon(); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewSubredditDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewSubredditDetailActivity.java index 6527c928..c1f10bd4 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/ViewSubredditDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/ViewSubredditDetailActivity.java @@ -554,17 +554,17 @@ public class ViewSubredditDetailActivity extends AppCompatActivity implements So break; case PostTypeBottomSheetFragment.TYPE_LINK: intent = new Intent(this, PostLinkActivity.class); - intent.putExtra(PostTextActivity.EXTRA_SUBREDDIT_NAME, subredditName); + intent.putExtra(PostLinkActivity.EXTRA_SUBREDDIT_NAME, subredditName); startActivity(intent); break; case PostTypeBottomSheetFragment.TYPE_IMAGE: intent = new Intent(this, PostImageActivity.class); - intent.putExtra(PostTextActivity.EXTRA_SUBREDDIT_NAME, subredditName); + intent.putExtra(PostImageActivity.EXTRA_SUBREDDIT_NAME, subredditName); startActivity(intent); break; case PostTypeBottomSheetFragment.TYPE_VIDEO: intent = new Intent(this, PostVideoActivity.class); - intent.putExtra(PostTextActivity.EXTRA_SUBREDDIT_NAME, subredditName); + intent.putExtra(PostVideoActivity.EXTRA_SUBREDDIT_NAME, subredditName); startActivity(intent); } } |