-
Notifications
You must be signed in to change notification settings - Fork 975
Converts ClearBrowsingDataPanel into redux component #9457
Converts ClearBrowsingDataPanel into redux component #9457
Conversation
9beae3a
to
c3d33de
Compare
app/ledger.js
Outdated
@@ -168,7 +168,8 @@ const doAction = (action) => { | |||
break | |||
|
|||
case appConstants.APP_ON_CLEAR_BROWSING_DATA: | |||
if (action.clearDataDetail.get('browserHistory') && !getSetting(settings.PAYMENTS_ENABLED)) reset(true) | |||
// TODO |
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.
@bsclifton @bridiver I would need your help here. What we need to add here is state (now we only get action) so that you can check it the same way we do it for sites. How should we address this problem?
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.
I was thinking to add state directly in same as we do with other reducers. One thing that we can also do is get state only in this case with getState
Except this ledger problem everything else is done |
51127ac
to
4464958
Compare
Don't squash commits, because second one is quite special and I would keep it separated. |
df8b6b3
to
aeeca3d
Compare
if (action.clearDataDetail.get('browserHistory')) { | ||
appDispatcher.waitFor([appStore.dispatchToken], () => { | ||
appDispatcher.waitFor([appStore.dispatchToken], () => { | ||
if (appStore.getState().getIn(['clearBrowsingDataDefaults', 'browserHistory'])) { |
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.
why the change here from action.clearDataDetail to checking the state?
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.
Because we are not sending anything in the action anymore. We have everything that we need directly in the store already. We are saving data here already https://github.com/brave/browser-laptop/pull/9457/files#diff-23ca389e2bcb77191b5a9c10900eb3a3R697
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.
++
Resolves brave#9440 Auditors: @bridiver @bsclifton Test Plan:
aeeca3d
to
17057bd
Compare
Submitter Checklist:
git rebase -i
to squash commits (if needed).Resolves #9440
Auditors: @bridiver @bsclifton
Test Plan:
Reviewer Checklist:
Tests