Skip to content

Commit

Permalink
Badge count only shows work not chat count
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscant committed Dec 27, 2018
1 parent fc619ae commit 0530145
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion http/js/iznik/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ define([
}

Iznik.setTitleCounts = function(chat, newsfeed, work) {
console.log("setTitleCounts A", chat, newsfeed, work);
if (chat !== null) {
chatTitleCount = chat;
}
Expand All @@ -483,7 +484,7 @@ define([
}

var unseen = chatTitleCount + newsfeedTitleCount + workTitleCount;
console.log("setTitleCounts", chatTitleCount, newsfeedTitleCount, workTitleCount);
console.log("setTitleCounts B", chatTitleCount, newsfeedTitleCount, workTitleCount);

// We'll adjust the count in the window title.
var title = document.title;
Expand All @@ -497,6 +498,7 @@ define([
}

if (window.mobilePush) { // CC
if (MODTOOLS) unseen = workTitleCount;
window.mobilePush.setApplicationIconBadgeNumber(function () { }, function () { }, unseen);
console.log("BASE badge count set to: " + unseen);
if (unseen == 0) { window.mobilePush.clearAllNotifications(); }
Expand Down
2 changes: 1 addition & 1 deletion http/js/iznik/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ function mainOnAppStart() { // CC

window.mobilePush.on('error', function (e) {
//alert("error: " + e.message);
console.log("MAIN mobilePush error " + e.message);
console.log("MAIN mobilePush error " + e.message);
});
}

Expand Down

0 comments on commit 0530145

Please sign in to comment.