Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

manage firstRun better #2398

Merged
merged 1 commit into from
Sep 29, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion js/src/views/Application/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -104,7 +105,7 @@ class Application extends Component {
.listAccounts()
.then((accounts) => {
this.setState({
showFirst: accounts.length === 0
showFirstRun: showFirstRun || accounts.length === 0
});
})
.catch((error) => {
Expand All @@ -113,6 +114,7 @@ class Application extends Component {
}

onCloseFirstRun = () => {
window.localStorage.setItem('showFirstRun', '0');
this.setState({
showFirstRun: false
});
Expand Down