Fix some bugs.

This commit is contained in:
Alex Ning 2020-04-14 17:03:56 +08:00
parent 23aea84b6f
commit c79a65300b
2 changed files with 5 additions and 1 deletions

View File

@ -133,7 +133,7 @@ public class LinkResolverActivity extends AppCompatActivity {
Intent intent = new Intent(this, ViewMultiRedditDetailActivity.class); Intent intent = new Intent(this, ViewMultiRedditDetailActivity.class);
intent.putExtra(ViewMultiRedditDetailActivity.EXTRA_MULTIREDDIT_PATH, path); intent.putExtra(ViewMultiRedditDetailActivity.EXTRA_MULTIREDDIT_PATH, path);
startActivity(intent); 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 intent = new Intent(this, ViewPostDetailActivity.class);
intent.putExtra(ViewPostDetailActivity.EXTRA_POST_ID, path.substring(1)); intent.putExtra(ViewPostDetailActivity.EXTRA_POST_ID, path.substring(1));
startActivity(intent); startActivity(intent);

View File

@ -138,6 +138,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
private int mColorPrimaryLightTheme; private int mColorPrimaryLightTheme;
private int mColorAccent; private int mColorAccent;
private int mCircularProgressBarBackgroundColor;
private int mCardViewColor; private int mCardViewColor;
private int mSecondaryTextColor; private int mSecondaryTextColor;
private int mPostTitleColor; private int mPostTitleColor;
@ -294,6 +295,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
mColorPrimaryLightTheme = customThemeWrapper.getColorPrimaryLightTheme(); mColorPrimaryLightTheme = customThemeWrapper.getColorPrimaryLightTheme();
mColorAccent = customThemeWrapper.getColorAccent(); mColorAccent = customThemeWrapper.getColorAccent();
mCircularProgressBarBackgroundColor = customThemeWrapper.getCircularProgressBarBackground();
mCardViewColor = customThemeWrapper.getCardViewBackgroundColor(); mCardViewColor = customThemeWrapper.getCardViewBackgroundColor();
mPostTitleColor = customThemeWrapper.getPostTitleColor(); mPostTitleColor = customThemeWrapper.getPostTitleColor();
mPrimaryTextColor = customThemeWrapper.getPrimaryTextColor(); mPrimaryTextColor = customThemeWrapper.getPrimaryTextColor();
@ -2169,6 +2171,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
commentTimeTextView.setTextColor(mSecondaryTextColor); commentTimeTextView.setTextColor(mSecondaryTextColor);
commentMarkdownView.setTextColor(mCommentTextColor); commentMarkdownView.setTextColor(mCommentTextColor);
authorFlairTextView.setTextColor(mAuthorFlairTextColor); authorFlairTextView.setTextColor(mAuthorFlairTextColor);
topScoreTextView.setTextColor(mSecondaryTextColor);
commentDivider.setBackgroundColor(mDividerColor); commentDivider.setBackgroundColor(mDividerColor);
upvoteButton.setColorFilter(mCommentIconAndInfoColor, android.graphics.PorterDuff.Mode.SRC_IN); upvoteButton.setColorFilter(mCommentIconAndInfoColor, android.graphics.PorterDuff.Mode.SRC_IN);
scoreTextView.setTextColor(mCommentIconAndInfoColor); scoreTextView.setTextColor(mCommentIconAndInfoColor);
@ -2209,6 +2212,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
LoadCommentsViewHolder(@NonNull View itemView) { LoadCommentsViewHolder(@NonNull View itemView) {
super(itemView); super(itemView);
ButterKnife.bind(this, itemView); ButterKnife.bind(this, itemView);
circleProgressBar.setBackgroundTintList(ColorStateList.valueOf(mCircularProgressBarBackgroundColor));
circleProgressBar.setColorSchemeColors(mColorAccent); circleProgressBar.setColorSchemeColors(mColorAccent);
} }
} }