Reload user when posting
[blerg.git] / www / jssrc / blerg / Blerg.js
index af0f688..6eac0d8 100644 (file)
@@ -8,7 +8,8 @@ enyo.kind({
         onTryLogin: "tryLogin",
         onTryLogout: "tryLogout",
         onSetTitle: "setTitle",
-        onPostVisibility: "postVisibilityUpdate"
+        onPostVisibility: "postVisibilityUpdate",
+        onReload: "sendReload"
     },
     components: [
         {classes: "blerg-header", components: [
@@ -36,10 +37,10 @@ enyo.kind({
 
         document.body.addEventListener('keyup', function(event) {
             if (event.shiftKey && event.keyCode == 32) {
-                this.$.post.show();
+                this.waterfall('onPostVisibility', {showing: true});
                 event.stopPropagation();
             }
-        }, false);
+        }.bind(this), false);
     },
     hashCheck: function() {
         if (location.hash != this.lastHash) {
@@ -88,5 +89,8 @@ enyo.kind({
     postVisibilityUpdate: function(inSender, inEvent) {
         this.$.post.waterfall('onPostVisibility', inEvent);
         this.$.controls.waterfall('onPostVisibility', inEvent);
+    },
+    sendReload: function() {
+        this.$.main.waterfall('onReload');
     }
 });