refactored notifications library to mark all notifs read when the menu is

opened (closes #134)
This commit is contained in:
Julian Lam
2013-08-07 22:42:34 -04:00
parent 984ac21e52
commit 7251af56e3
4 changed files with 35 additions and 46 deletions

View File

@@ -1057,22 +1057,6 @@ var utils = require('./../public/src/utils.js'),
},
getUnreadCount: function(uid, callback) {
RDB.zcount('uid:' + uid + ':notifications:unread', 0, 10, callback);
},
hasFlag: function(uid, callback) {
RDB.get('uid:1:notifications:flag', function(err, flag) {
if (err) {
RDB.handle(err);
}
callback(flag === 1);
});
},
removeFlag: function(uid) {
RDB.del('uid:' + uid + ':notifications:flag', function(err) {
if (err) {
RDB.handle(err);
}
});
}
}
}(exports));