Move user flags from settings [MAILPOET-1677]
This commit is contained in:
committed by
M. Shull
parent
6218166ca1
commit
afe7aa0a54
@@ -53,12 +53,10 @@ class FeatureAnnouncement extends React.Component {
|
||||
this.setState({ showDot: false });
|
||||
MailPoet.Modal.loading(false);
|
||||
window.Beamer.show();
|
||||
const data = { last_announcement_seen: window.mailpoet_last_announcement_seen || {} };
|
||||
const userId = window.mailpoet_current_wp_user.ID;
|
||||
data.last_announcement_seen[userId] = Math.floor(Date.now() / 1000);
|
||||
const data = { last_announcement_seen: Math.floor(Date.now() / 1000) };
|
||||
MailPoet.Ajax.post({
|
||||
api_version: window.mailpoet_api_version,
|
||||
endpoint: 'settings',
|
||||
endpoint: 'user_flags',
|
||||
action: 'set',
|
||||
data,
|
||||
});
|
||||
|
@@ -2,7 +2,6 @@ import MailPoet from 'mailpoet';
|
||||
import moment from 'moment';
|
||||
|
||||
const displayTutorial = () => {
|
||||
const key = `user_seen_editor_tutorial${window.config.currentUserId}`;
|
||||
if (window.config.dragDemoUrlSettings) {
|
||||
return;
|
||||
}
|
||||
@@ -15,9 +14,9 @@ const displayTutorial = () => {
|
||||
onCancel: () => {
|
||||
MailPoet.Ajax.post({
|
||||
api_version: window.mailpoet_api_version,
|
||||
endpoint: 'settings',
|
||||
endpoint: 'user_flags',
|
||||
action: 'set',
|
||||
data: { [key]: 1 },
|
||||
data: { editor_tutorial_seen: 1 },
|
||||
});
|
||||
},
|
||||
});
|
||||
|
Reference in New Issue
Block a user