aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2020-04-14 09:03:56 +0000
committerAlex Ning <chineseperson5@gmail.com>2020-04-14 09:03:56 +0000
commitc79a65300bcbd3a5547fbf17ea6eca9d3393c338 (patch)
tree4f461f612204d02c0291b7053b586a5e73b892b4 /app
parent23aea84b6fe42655e1d07db40fb5facaa3ce814f (diff)
downloadinfinity-for-reddit-c79a65300bcbd3a5547fbf17ea6eca9d3393c338.tar
infinity-for-reddit-c79a65300bcbd3a5547fbf17ea6eca9d3393c338.tar.gz
infinity-for-reddit-c79a65300bcbd3a5547fbf17ea6eca9d3393c338.tar.bz2
infinity-for-reddit-c79a65300bcbd3a5547fbf17ea6eca9d3393c338.tar.lz
infinity-for-reddit-c79a65300bcbd3a5547fbf17ea6eca9d3393c338.tar.xz
infinity-for-reddit-c79a65300bcbd3a5547fbf17ea6eca9d3393c338.tar.zst
infinity-for-reddit-c79a65300bcbd3a5547fbf17ea6eca9d3393c338.zip
Fix some bugs.
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LinkResolverActivity.java2
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java4
2 files changed, 5 insertions, 1 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LinkResolverActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LinkResolverActivity.java
index 92ef6064..f932427f 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LinkResolverActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LinkResolverActivity.java
@@ -133,7 +133,7 @@ public class LinkResolverActivity extends AppCompatActivity {
Intent intent = new Intent(this, ViewMultiRedditDetailActivity.class);
intent.putExtra(ViewMultiRedditDetailActivity.EXTRA_MULTIREDDIT_PATH, path);
startActivity(intent);
- } else if (path.matches(REDD_IT_POST_PATTERN)) {
+ } else if (authority.equals("redd.it") && path.matches(REDD_IT_POST_PATTERN)) {
Intent intent = new Intent(this, ViewPostDetailActivity.class);
intent.putExtra(ViewPostDetailActivity.EXTRA_POST_ID, path.substring(1));
startActivity(intent);
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java
index aad2f712..d103ce96 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java
@@ -138,6 +138,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
private int mColorPrimaryLightTheme;
private int mColorAccent;
+ private int mCircularProgressBarBackgroundColor;
private int mCardViewColor;
private int mSecondaryTextColor;
private int mPostTitleColor;
@@ -294,6 +295,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
mColorPrimaryLightTheme = customThemeWrapper.getColorPrimaryLightTheme();
mColorAccent = customThemeWrapper.getColorAccent();
+ mCircularProgressBarBackgroundColor = customThemeWrapper.getCircularProgressBarBackground();
mCardViewColor = customThemeWrapper.getCardViewBackgroundColor();
mPostTitleColor = customThemeWrapper.getPostTitleColor();
mPrimaryTextColor = customThemeWrapper.getPrimaryTextColor();
@@ -2169,6 +2171,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
commentTimeTextView.setTextColor(mSecondaryTextColor);
commentMarkdownView.setTextColor(mCommentTextColor);
authorFlairTextView.setTextColor(mAuthorFlairTextColor);
+ topScoreTextView.setTextColor(mSecondaryTextColor);
commentDivider.setBackgroundColor(mDividerColor);
upvoteButton.setColorFilter(mCommentIconAndInfoColor, android.graphics.PorterDuff.Mode.SRC_IN);
scoreTextView.setTextColor(mCommentIconAndInfoColor);
@@ -2209,6 +2212,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
LoadCommentsViewHolder(@NonNull View itemView) {
super(itemView);
ButterKnife.bind(this, itemView);
+ circleProgressBar.setBackgroundTintList(ColorStateList.valueOf(mCircularProgressBarBackgroundColor));
circleProgressBar.setColorSchemeColors(mColorAccent);
}
}