-
Notifications
You must be signed in to change notification settings - Fork 903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reddit inline tips link on post menu will now appear #2665
Conversation
2befd94
to
1da9930
Compare
40d333e
to
225ccb9
Compare
722cae1
to
e2a818d
Compare
e2a818d
to
d02d8f5
Compare
982ca24
to
d1f861f
Compare
@jasonrsadler I asked for refactor and I stopped at that point. I didn't do a full review, sorry other things are going on. Today I did a full review |
db8f9a5
to
67c7aa3
Compare
Thanks. refactor was pushed to post PR as was discussed before your original review so not sure why review here was partial. Understand lots going on. |
67c7aa3
to
7aedb98
Compare
13bb864
to
49d7004
Compare
eaa3a4f
to
93fc6aa
Compare
redditMetaData.postText.length > 0 | ||
? 'redditTipTitle' | ||
: 'redditTipTitleEmpty' | ||
publisher.title = 'u/' + getLocale(key, { user: redditMetaData.userName }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be like publisher.title = getLocale(key, { user: 'u/' + redditMetaData.userName })
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@jasonrsadler are we not displaying reddit box for posts? Is this intentionally? |
@jasonrsadler we need tweet out on thank you page on reddit as well, like we have it on twitter tips, right? |
} | ||
GURL url(REDDIT_USER_URL + ledger_->URIEncode(user_name)); | ||
if (!url.is_valid()) { | ||
callback(ledger::Result::TIP_ERROR, std::move(publisher_info)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we return info here or just null if we have an error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
based on other callbacks with errors I would say just return nullptr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
const std::string favicon_url = GetProfileImageUrl(data); | ||
const std::string media_key = GetMediaKey(user_name, REDDIT_MEDIA_TYPE); | ||
|
||
if (publisher_key.empty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe try to exit as soon as possible
So when we get publisher_key
on line 320 we check if valid, before continue parsing other things
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
ledger_->SaveMediaVisit(publisher_key, | ||
*visit_data, | ||
0, | ||
0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to pass window_id into SavePublisherInfo
so that correct panel is updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
61b65e1
to
f9ad478
Compare
For posts, there was a dom change. That is fixed. For tweet on tip, the original thinking was that it wouldn't be available for inline reddit. However, never got an official word so it is restored. |
f9ad478
to
2c44c08
Compare
Fixes brave/brave-browser#4915
brave-ui: brave/brave-ui#498 brave/brave-ui#501
Submitter Checklist:
npm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
After-merge Checklist:
changes has landed on.