diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2016-03-23 16:01:20 -0400 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2016-03-23 16:01:49 -0400 |
commit | c6e14fc38074526269f8e2ffb158014351584f95 (patch) | |
tree | 831bf7dfc8db03590e9cbf61b6090fe14f0c2b38 /webapp/components/tutorial/tutorial_tip.jsx | |
parent | 7af2e6f87a754312809aa044edd062930616401a (diff) | |
download | chat-c6e14fc38074526269f8e2ffb158014351584f95.tar.gz chat-c6e14fc38074526269f8e2ffb158014351584f95.tar.bz2 chat-c6e14fc38074526269f8e2ffb158014351584f95.zip |
Fixed tutorial step preferences to be saved as strings
Diffstat (limited to 'webapp/components/tutorial/tutorial_tip.jsx')
-rw-r--r-- | webapp/components/tutorial/tutorial_tip.jsx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/webapp/components/tutorial/tutorial_tip.jsx b/webapp/components/tutorial/tutorial_tip.jsx index d93fff1b1..3508e29a2 100644 --- a/webapp/components/tutorial/tutorial_tip.jsx +++ b/webapp/components/tutorial/tutorial_tip.jsx @@ -29,12 +29,12 @@ export default class TutorialTip extends React.Component { this.setState({show}); if (!show && this.state.currentScreen >= this.props.screens.length - 1) { - let step = PreferenceStore.getInt(Preferences.TUTORIAL_STEP, UserStore.getCurrentId(), 0); + const step = PreferenceStore.getInt(Preferences.TUTORIAL_STEP, UserStore.getCurrentId(), 0); AsyncClient.savePreference( Preferences.TUTORIAL_STEP, UserStore.getCurrentId(), - step + 1 + (step + 1).toString() ); } } @@ -48,8 +48,12 @@ export default class TutorialTip extends React.Component { } skipTutorial(e) { e.preventDefault(); - const preference = PreferenceStore.setPreference(Preferences.TUTORIAL_STEP, UserStore.getCurrentId(), '999'); - AsyncClient.savePreferences([preference]); + + AsyncClient.savePreference( + Preferences.TUTORIAL_STEP, + UserStore.getCurrentId(), + '999' + ); } render() { const buttonText = this.state.currentScreen === this.props.screens.length - 1 ? ( |