diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-03-23 14:22:30 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2016-03-23 14:22:30 -0400 |
commit | 6275ad2ae48807738ddd9a28bd69ff3f5ccc1a50 (patch) | |
tree | adee85d0a0e2e09f846fd4890c6b5843728ca165 /webapp/components/tutorial/tutorial_tip.jsx | |
parent | aed690c5891a2cff97cc5fa00648c86be54ed8ee (diff) | |
parent | 1f46cca65ca0669c1fc1a6fec5113f835a1a3023 (diff) | |
download | chat-6275ad2ae48807738ddd9a28bd69ff3f5ccc1a50.tar.gz chat-6275ad2ae48807738ddd9a28bd69ff3f5ccc1a50.tar.bz2 chat-6275ad2ae48807738ddd9a28bd69ff3f5ccc1a50.zip |
Merge pull request #2515 from hmhealey/prefs
Changed PreferenceStore to store data in memory
Diffstat (limited to 'webapp/components/tutorial/tutorial_tip.jsx')
-rw-r--r-- | webapp/components/tutorial/tutorial_tip.jsx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/webapp/components/tutorial/tutorial_tip.jsx b/webapp/components/tutorial/tutorial_tip.jsx index ab49d4b04..d93fff1b1 100644 --- a/webapp/components/tutorial/tutorial_tip.jsx +++ b/webapp/components/tutorial/tutorial_tip.jsx @@ -29,12 +29,13 @@ export default class TutorialTip extends React.Component { this.setState({show}); if (!show && this.state.currentScreen >= this.props.screens.length - 1) { - let preference = PreferenceStore.getPreference(Preferences.TUTORIAL_STEP, UserStore.getCurrentId(), {value: '0'}); + let step = PreferenceStore.getInt(Preferences.TUTORIAL_STEP, UserStore.getCurrentId(), 0); - const newValue = (parseInt(preference.value, 10) + 1).toString(); - - preference = PreferenceStore.setPreference(Preferences.TUTORIAL_STEP, UserStore.getCurrentId(), newValue); - AsyncClient.savePreferences([preference]); + AsyncClient.savePreference( + Preferences.TUTORIAL_STEP, + UserStore.getCurrentId(), + step + 1 + ); } } handleNext() { |