From b5e14cb35d915aea6345283d5632c9452ce20010 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Thu, 29 Sep 2016 13:41:16 +0200 Subject: [PATCH] manage firstRun better --- js/src/views/Application/application.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/src/views/Application/application.js b/js/src/views/Application/application.js index 4f5473b7d86..9f637c058cb 100644 --- a/js/src/views/Application/application.js +++ b/js/src/views/Application/application.js @@ -29,6 +29,7 @@ import TabBar from './TabBar'; import styles from './application.css'; const inFrame = window.parent !== window && window.parent.frames.length !== 0; +const showFirstRun = window.localStorage.getItem('showFirstRun') === '1'; class Application extends Component { static contextTypes = { @@ -104,7 +105,7 @@ class Application extends Component { .listAccounts() .then((accounts) => { this.setState({ - showFirst: accounts.length === 0 + showFirstRun: showFirstRun || accounts.length === 0 }); }) .catch((error) => { @@ -113,6 +114,7 @@ class Application extends Component { } onCloseFirstRun = () => { + window.localStorage.setItem('showFirstRun', '0'); this.setState({ showFirstRun: false });