Skip to content

Commit

Permalink
fix dense option
Browse files Browse the repository at this point in the history
  • Loading branch information
Yury Shapkarin committed Jan 31, 2020
1 parent 32f9f3b commit 4df4baf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions src/options/components/options.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ import themes, { DEFAULT_THEME } from '../../themes';
export default class Options extends React.Component {
constructor(props) {
super(props);
const localStorage = {
showURL: window.localStorage.getItem('showURL'),
isCollapsed: window.localStorage.getItem('isCollapsed'),
isSeparated: window.localStorage.getItem('isSeparated'),
}
this.state = {
showUrl: window.localStorage.getItem('showURL') === 'true',
isSeparated: window.localStorage.getItem('isSeparated') === 'true',
isCollapsed: window.localStorage.getItem('isCollapsed') === 'true',
showUrl: JSON.parse(localStorage.showURL),
isSeparated: JSON.parse(localStorage.isSeparated),
isCollapsed: localStorage.isCollapsed === null ? true : JSON.parse(localStorage.isCollapsed),
theme: window.localStorage.getItem('theme') || DEFAULT_THEME
};
this.changeTheme = this.changeTheme.bind(this);
Expand Down

0 comments on commit 4df4baf

Please sign in to comment.