+ this.$.api.login(inEvent.username, inEvent.password);
+ },
+ tryLogout: function(inSender, inEvent) {
+ this.$.api.logout();
+ },
+ loginSuccessful: function(inSender, inEvent) {
+ this.$.api.requestFeedStatus();
+ this.feedStatusUpdateInterval = setInterval(function() {
+ this.$.api.requestFeedStatus();
+ }.bind(this), 900000);
+ this.waterfall('onLogin', inEvent);
+ },
+ loginFailed: function(inSender, inEvent) {
+ alert('Login failed');
+ this.logout();
+ },
+ logout: function(inSender, inEvent) {
+ clearInterval(this.feedStatusUpdateInterval);
+ this.waterfall('onLogout');
+ },
+ postVisibilityUpdate: function(inSender, inEvent) {
+ this.$.post.waterfall('onPostVisibility', inEvent);
+ this.$.controls.waterfall('onPostVisibility', inEvent);