-
Notifications
You must be signed in to change notification settings - Fork 885
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
Android news orientation card #13203
Conversation
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.
++
@@ -732,6 +732,10 @@ private void refreshFeed() { | |||
|
|||
private void keepPosition(int prevScrollPosition, int prevRecyclerViewPosition, | |||
int prevRecyclerViewItemPosition) { | |||
if ((!mIsNewsOn && mIsShowNewsOn) || (mIsNewsOn && mIsShowOptin) |
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.
Not subject or request to change, but the fact which may be useful to understand the intention:
(!mIsNewsOn && mIsShowNewsOn) || (mIsNewsOn && !mIsShowNewsOn)
is equal algebraically to just
(mIsNewsOn != mIsShowNewsOn)
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.
@AlexeyBarabash thanks! that's a good point. updating
also fixes news feed wrongly appearing on orientation change after disabling
c19c69a
to
3548837
Compare
Verification PASSED on
|
Example |
Example |
Example |
---|---|---|
Upgrading (Brave News hasn't been enabled)
- downloaded/installed
1.39.67 Chromium: 101.0.4951.34
and ensured that the opt-in card isn't being displayed under NTP - upgraded to
1.40.44 Chromium: 101.0.4951.54
and ensured that the opt-in card is being displayed without any issues - ensured that once upgraded, the user can opt-in into Brave News by tapping on
Show Brave News
- ensured that once upgraded, users can dismiss the opt-in card via NTP and later enable Brave News via
Settings
Upgrading (Brave News enabled but then disabled by user)
- downloaded/installed
1.39.67 Chromium: 101.0.4951.34
- enabled Brave News via
Settings
and then disabled the the feature viaSettings
(ensured feed isn't appearing under NTP) - upgraded to
1.40.44 Chromium: 101.0.4951.54
- ensured that the opt-in card wasn't being displayed as the user already enabled Brave News but decided to disable
- ensure that you can re-enable Brave News via
Settings
without any issues after upgrading
Upgrading (Brave News enabled & visible)
- downloaded/installed
1.39.67 Chromium: 101.0.4951.34
and enabled Brave News viaSettings
- upgraded to
1.40.12 Chromium: 101.0.4951.41
- ensured that Brave News is still enabled/appearing under NTP
Created/Ran into the following issues while going through the above cases:
Learn more about your data
opening#brave-today
rather than#brave-news
brave-browser#22553- crash changing orientation/scrolling through NTP after upgrading from profile that had news disabled after initially enabling brave-browser#22777
Test Case #2
- brave/brave-browser#22444
Went through the STR/Cases outlined via brave/brave-browser#22444 (comment) and ensured that the original issue wasn't occurring.
- ensured that the news feed isn't being displayed within the same tab once disabled and device orientation is changed
- ensured that the news feed isn't being displayed in new NTP when changing device orientation once disabled
- ensured that restarting the browser and changing the orientation on the NTP doesn't display news after it's been disabled
- ensured that switching between
portrait
&landscape
several times under NTP doesn't cause issues when news has never been enabled (basically the user dismissing the onboarding card) - ensured that switching between
portrait
&landscape
several times under NTP doesn't cause issues when news was enabled and then disabled
Quick example of the issue not occurring anymore:
Screen_Recording_20220510-202216_Brave.-.Nightly.mp4
Test Case #3
- brave/brave-browser#22569
Went through the STR/Cases outlined via brave/brave-browser#22569 (comment) and ensured that the original issue wasn't occurring.
Resolves brave/brave-browser#22569
Resolves brave/brave-browser#22444
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: