-
Notifications
You must be signed in to change notification settings - Fork 975
Add notification to suggest users use Brave Payments #4141
Conversation
Auditors: @bsclifton Test Plan: Upgrading existing userData 1. Be on `master` and close Brave 2. Open session-store-1 with less (e.g. ~/Library/Application\ Support/brave-development/session-store-1) 3. See firstRunTimestamp is not there 4. Check out this branch 5. Open Brave, then close it 6. View again session-store-1 and see firstRunTimestamp is there 8. Restart Brave again, then close it 9. See firstRunTimestamp is see firstRunTimestamp is unchanged New profile 1. Delete userData dir (e.g. ~/Library/Application\ Support/brave-development) 2. Open Brave 3. Close Brave 4. View session-store-1 and see firstRunTimestamp
04ca066
to
ab440b2
Compare
@@ -383,6 +391,9 @@ eventStore.addChangeListener(() => { | |||
var initialize = (onoff) => { | |||
enable(onoff) | |||
|
|||
// Check if relevant browser notifications should be shown every 15 minutes | |||
setInterval(showNotifications, 15 * msecs.minute) |
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.
clearInterval
never gets called on this, so i think a new timer is added every time the user clicks the on/off switch. this may lead to notifications being shown more often than intended or something
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.
maybe add a global var to keep track of whether setInterval
has already been called and do nothing here if it has
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.
thanks good call– it was originally there but i removed it (oops).
i added it back
otherwise 👍 |
ab440b2
to
47d7aaa
Compare
Auditors: @bsclifton @diracdeltas Test Plan: 1. Edit `ledger.js` to reduce showNotifications delay interval to 3 * msecs.second 2. Run Brave with an existing profile 3. Confirm there's no notification 4. Close Brave 5. Update userData session-store-1 firstRunTimestamp to be way in the past e.g. from '14..' to '13..' (~/Library/Application\ Support/session-store-1) 6. Open Brave 7. Confirm notification
47d7aaa
to
35971f5
Compare
👍 |
git rebase -i
to squash commits (if needed).Fix #3257 (Finishes the remaining task)
Auditors: @bsclifton @diracdeltas
Test Plan:
ledger.js
to reduce showNotifications delay interval to 3 * msecs.second