+ },
+ updateStatus: function() {
+ this.$.api.getStatus();
+ },
+ gotStatus: function(inSender, inEvent) {
+ if ('mentioned' in inEvent) {
+ this.$.mentionButton.addRemoveClass('new', inEvent.mentioned);
+ }
+ if ('feed_new' in inEvent) {
+ this.$.feedButton.addRemoveClass('new', inEvent.feed_new > 0);
+ if (inEvent.feed_new > 0) {
+ this.$.feedButton.setContent('Stalk Your Victims (' + inEvent.feed_new + ')');
+ } else {
+ this.$.feedButton.setContent('Stalk Your Victims');
+ }
+ }
+ },
+ chatterClicked: function() {
+ window.location.href = '/#/ref/' + this.username;
+ this.bubble('onNavigate');
+ },
+ feedClicked: function() {
+ window.location.href = '/#/feed';
+ this.bubble('onNavigate');
+ },
+ clearNotification: function(inSender, inEvent) {
+ if (inEvent.type == 'feed') {
+ this.gotStatus(this, {feed_new: 0});
+ } else if (inEvent.type == 'mentioned') {
+ this.gotStatus(this, {mentioned: false});
+ }