handlers: {
onLogin: "login",
onLogout: "logout",
- onPostVisibility: "postVisibilityUpdate"
+ onPostVisibility: "postVisibilityUpdate",
+ onClearFeedStatus: "clearFeedStatus"
},
components: [
{name: "loggedOutControls", components: [
]}
]},
{name: "loggedInControls", showing: false, components: [
- {name: "greeting", components: [
+ {name: "greeting", classes: "blerg-controls-greeting", components: [
{tag: null, content: "Hello, "},
{name: "userlink", tag: "a"},
{tag: null, content: ". "},
this.$.userlink.setContent('@' + inEvent.username);
this.username = inEvent.username;
- this.$.api.getFeedInfo();
+ this.updateFeedInfo();
this.feedStatusUpdateInterval = setInterval(function() {
- this.$.api.getFeedInfo();
+ this.updateFeedInfo();
}.bind(this), 900000);
},
logout: function(inSender, inEvent) {
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) {
feedClicked: function() {
window.location.href = '/#/feed';
this.bubble('onNavigate');
+ },
+ clearFeedStatus: function() {
+ this.gotFeedInfo(this, {new: 0});
}
});