Permalink
Browse files

Merge branch 'master' of github.com:buddycloud/buddycloud-webclient

  • Loading branch information...
2 parents 8232f52 + a778cf4 commit 1ad3a4db7503337ff70a26cb00e9f15c40b49057 @dodo dodo committed Feb 28, 2012
Showing with 14 additions and 3 deletions.
  1. +12 −0 src/handlers/data.coffee
  2. +2 −2 src/handlers/rsm_queue.coffee
  3. +0 −1 src/views/sidebar/entry.coffee
@@ -221,6 +221,18 @@ class exports.DataHandler extends Backbone.EventHandler
cb()
, (cb) =>
@connector.replayNotifications mamStart, cb
+ , (cb) =>
+ # Check what status nodes are left to load
+ # (we display them in the sidebar):
+ statusnodes = app.users.current.channels.map((channel) =>
+ channel.nodes.get_or_create(id: 'status')
+ ).filter((statusnode) =>
+ # Not loaded most recent post yet?
+ not (statusnode.posts.at(0)?)
+ )
+ async.forEach statusnodes, (statusnode, cb2) =>
+ @get_node_posts statusnode.get('nodeid'), cb2
+ , cb
], =>
@set_loading false
@@ -15,8 +15,8 @@ class exports.RSMQueue
# Reset RSM:
delete node["#{@name}_rsm"]
- if rsm_info and rsm_info.end_reached
- cb(null, [])
+ if rsm_info?.end_reached
+ cb? null, [], yes
else
@queued[id] = [cb]
@@ -24,7 +24,6 @@ class exports.ChannelEntry extends BaseView
statusnode = @model.nodes.get_or_create(id: 'status')
statusnode.bind 'post', =>
@trigger 'update:status', statusnode.posts.at(0)?.get('content')?.value
- app.handler.data.get_node_posts statusnode.get('nodeid')
events:
"click": "click_entry"

0 comments on commit 1ad3a4d

Please sign in to comment.