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

Commit

Permalink
Merge pull request #182 from tahnik/notif_fix
Browse files Browse the repository at this point in the history
Notif fix
  • Loading branch information
tahnik authored Aug 27, 2017
2 parents 218e7ef + f1d96dc commit 28806ef
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
18 changes: 10 additions & 8 deletions app/src/main/js/actions/notifs.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,22 @@ const fetchNotifs = () => (dispatch, getState) => {
fetching = false;
let noChange = true;

if (prevNotifs.num_unread === res.data.num_unread) {
if (prevNotifs && prevNotifs.num_unread === res.data.num_unread) {
const nextnotifItems = res.data.items;
let j = 0;
while (j < nextnotifItems.length) {
const prevItem = prevNotifs.items[j];
const nextItem = nextnotifItems[j];
if (
if (nextnotifItems) {
while (j < nextnotifItems.length) {
const prevItem = prevNotifs.items[j];
const nextItem = nextnotifItems[j];
if (
prevItem.rant_id !== nextItem.rant_id
|| prevItem.read !== nextItem.read
) {
noChange = false;
break;
noChange = false;
break;
}
j += 1;
}
j += 1;
}
} else {
noChange = false;
Expand Down
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.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "devrantron",
"version": "1.3.3",
"version": "1.3.4",
"main": "./app/build/app.js",
"description": "An open source cross platform desktop application for devRant",
"scripts": {
Expand Down Expand Up @@ -55,6 +55,9 @@
"AppImage"
]
},
"mac": {
"category": "public.app-category.developer-tools"
},
"directories": {
"output": "release"
}
Expand Down

0 comments on commit 28806ef

Please sign in to comment.