projects
/
blerg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clear feed status when reading feed
[blerg.git]
/
www
/
jssrc
/
blerg
/
Controls.js
diff --git
a/www/jssrc/blerg/Controls.js
b/www/jssrc/blerg/Controls.js
index
165b100
..
529df1e
100644
(file)
--- a/
www/jssrc/blerg/Controls.js
+++ b/
www/jssrc/blerg/Controls.js
@@
-10,7
+10,8
@@
enyo.kind({
handlers: {
onLogin: "login",
onLogout: "logout",
handlers: {
onLogin: "login",
onLogout: "logout",
- onPostVisibility: "postVisibilityUpdate"
+ onPostVisibility: "postVisibilityUpdate",
+ onClearFeedStatus: "clearFeedStatus"
},
components: [
{name: "loggedOutControls", components: [
},
components: [
{name: "loggedOutControls", components: [
@@
-82,9
+83,9
@@
enyo.kind({
this.$.userlink.setContent('@' + inEvent.username);
this.username = inEvent.username;
this.$.userlink.setContent('@' + inEvent.username);
this.username = inEvent.username;
- this.
$.api.get
FeedInfo();
+ this.
update
FeedInfo();
this.feedStatusUpdateInterval = setInterval(function() {
this.feedStatusUpdateInterval = setInterval(function() {
- this.
$.api.get
FeedInfo();
+ this.
update
FeedInfo();
}.bind(this), 900000);
},
logout: function(inSender, inEvent) {
}.bind(this), 900000);
},
logout: function(inSender, inEvent) {
@@
-102,6
+103,9
@@
enyo.kind({
this.postShowing = inEvent.showing;
this.$.spewButton.addRemoveClass('active', inEvent.showing);
},
this.postShowing = inEvent.showing;
this.$.spewButton.addRemoveClass('active', inEvent.showing);
},
+ updateFeedInfo: function() {
+ this.$.api.getFeedInfo();
+ },
gotFeedInfo: function(inSender, inEvent) {
this.$.feedButton.addRemoveClass('new', inEvent.new > 0);
if (inEvent.new > 0) {
gotFeedInfo: function(inSender, inEvent) {
this.$.feedButton.addRemoveClass('new', inEvent.new > 0);
if (inEvent.new > 0) {
@@
-117,5
+121,8
@@
enyo.kind({
feedClicked: function() {
window.location.href = '/#/feed';
this.bubble('onNavigate');
feedClicked: function() {
window.location.href = '/#/feed';
this.bubble('onNavigate');
+ },
+ clearFeedStatus: function() {
+ this.gotFeedInfo(this, {new: 0});
}
});
}
});