Skip to content
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

Fixes for metrics bugs GH-1001 and GH-1022 #47

Merged
merged 3 commits into from Apr 30, 2018
Merged
Changes from all commits
Commits
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

@@ -25,7 +25,7 @@ import {
TOGGLE_CLIQZ_FEATURE,
UPDATE_NOTIFICATION_STATUS
} from '../constants/constants';
import { sendMessage } from '../utils/msg';
import { sendMessage, sendMessageInPromise } from '../utils/msg';

const initialState = {
enable_ad_block: true,
@@ -73,7 +73,6 @@ export default (state = initialState, action) => {
return Object.assign({}, state, updated);
}
case CREATE_ACCOUNT_SUCCESS:
sendMessage('ping', 'create_account_extension');
return Object.assign({}, state, {
logged_in: true,
email: action.data.ClaimEmailAddress,
@@ -110,10 +109,11 @@ export default (state = initialState, action) => {
default:
break;
}
if (pingName) {
sendMessage('ping', pingName);
}
sendMessage('setPanelData', { [action.data.featureName]: !action.data.isEnabled });
sendMessageInPromise('setPanelData', { [action.data.featureName]: !action.data.isEnabled }).then(() => {
if (pingName) {
sendMessage('ping', pingName);
}
});
return Object.assign({}, state, { [action.data.featureName]: !action.data.isEnabled });
}
case TOGGLE_EXPANDED: {
ProTip! Use n and p to navigate between commits in a pull request.