Skip to content

Commit 5da077d

Browse files
Merge pull request #79 from ekonstantinidis/settings-localstorage-bug
Bug - Toggle settings (notifications & sound)
2 parents b077631 + 49317b1 commit 5da077d

File tree

3 files changed

+24
-22
lines changed

3 files changed

+24
-22
lines changed

.gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ npm-debug.log
44
build/
55
coverage/
66
node_modules/
7-
Gitify.app/
8-
7+
Gitify-darwin-x64/

package.json

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"name": "gitify",
3-
"version": "0.0.1",
3+
"version": "0.0.14",
44
"description": "GitHub Notifications on your menu bar.",
55
"main": "main.js",
66
"scripts": {
7-
"build-js": "mkdir -p build/js && browserify -t reactify src/js/app.js -o build/js/app.js",
7+
"build-js": "mkdir -p build/js && browserify -t babelify src/js/app.js -o build/js/app.js",
88
"build": "ulimit -n 512 && npm install && grunt build && npm run build-js",
9-
"watch-js": "watchify -t reactify src/js/app.js -o build/js/app.js -v",
10-
"watch": "grunt build && npm build && npm run watch-js | grunt watch",
9+
"watch-js": "watchify -t babelify src/js/app.js -o build/js/app.js -v",
10+
"watch": "npm run build && grunt build && npm run watch-js & grunt watch",
1111
"start": "electron .",
1212
"dist": "rm -rf Gitify.app/ && electron-packager . Gitify --platform=darwin --arch=x64 --version=0.30.2 --icon=images/app-icon.icns --prune --ignore=src",
13-
"test": "jsxhint --reporter node_modules/jshint-stylish/stylish.js 'src/**/*.js', 'index.js' --exclude 'Gruntfile.js' && jscs 'src/js/' && jest"
13+
"test": "jsxhint --reporter=node_modules/jshint-stylish 'src/**/*.js', 'index.js' --exclude 'Gruntfile.js' && jscs 'src/js/' && jest"
1414
},
1515
"jshintConfig": {
1616
"browserify": true,
@@ -121,34 +121,34 @@
121121
"homepage": "https://github.com/ekonstantinidis/gitify",
122122
"dependencies": {
123123
"auto-launch": "=0.1.18",
124-
"bootstrap": "=3.3.4",
125-
"browserify": "=10.2.1",
126-
"font-awesome": "=4.3.0",
127-
"octicons": "=2.2.0",
124+
"babelify": "=6.1.3",
125+
"bootstrap": "=3.3.5",
126+
"browserify": "=11.0.1",
127+
"font-awesome": "=4.4.0",
128+
"octicons": "=2.4.1",
128129
"react": "=0.13.3",
129130
"react-router": "=0.13.3",
130131
"react-toggle": "=1.2.3",
131132
"react-tools": "=0.13.3",
132-
"reactify": "=1.1.1",
133133
"reflux": "=0.2.7",
134134
"reloading": "0.0.6",
135135
"superagent": "=1.2.0",
136136
"underscore": "=1.8.3",
137-
"watchify": "=3.2.1"
137+
"watchify": "=3.3.1"
138138
},
139139
"devDependencies": {
140-
"electron-packager": "=4.1.2",
140+
"electron-packager": "=5.0.1",
141141
"electron-prebuilt": "=0.30.2",
142-
"esprima-fb": "=15001.1.0-dev-harmony-fb",
142+
"esprima-fb": "^15001.1001.0-dev-harmony-fb",
143143
"grunt": "=0.4.5",
144144
"grunt-contrib-clean": "=0.6.0",
145145
"grunt-contrib-copy": "=0.8.0",
146146
"grunt-contrib-less": "=1.0.1",
147147
"grunt-contrib-watch": "=0.6.1",
148148
"jest-cli": "=0.4.17",
149-
"jscs": "^1.13.1",
150-
"jshint-stylish": "=1.0.2",
151-
"jsxhint": "=0.15.0",
149+
"jscs": "=2.0.0",
150+
"jshint-stylish": "=2.0.1",
151+
"jsxhint": "=0.15.1",
152152
"less": "=2.5.1"
153153
}
154154
}

src/js/stores/settings.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,19 @@ var SettingsStore = Reflux.createStore({
2222
settings = JSON.parse(settings);
2323
}
2424

25-
if (!settings.participating) {
25+
if (typeof settings.participating !== 'boolean') {
2626
settings.participating = false;
2727
}
28-
if (!settings.playSound) {
28+
29+
if (typeof settings.playSound !== 'boolean') {
2930
settings.playSound = true;
3031
}
31-
if (!settings.showNotifications) {
32+
33+
if (typeof settings.showNotifications !== 'boolean') {
3234
settings.showNotifications = true;
3335
}
34-
if (!settings.openAtStartup) {
36+
37+
if (typeof settings.openAtStartup !== 'boolean') {
3538
settings.openAtStartup = false;
3639
}
3740

0 commit comments

Comments
 (0)