From 1791d6b1b8451811debe0095cdc06d872191cef0 Mon Sep 17 00:00:00 2001 From: danielgrippi Date: Wed, 9 May 2012 00:46:40 -0700 Subject: [PATCH] defer the optimistic loading of profile wallpaper and title (at least wait until the call stack is emptied) [ci skip] --- app/assets/javascripts/app/pages/profile.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/app/pages/profile.js b/app/assets/javascripts/app/pages/profile.js index 22f9c0056..90c403761 100644 --- a/app/assets/javascripts/app/pages/profile.js +++ b/app/assets/javascripts/app/pages/profile.js @@ -28,8 +28,11 @@ app.pages.Profile = app.views.Base.extend({ this.stream = options && options.stream || new app.models.Stream() /* this needs to be fixed... used to be bound by this.model change event. - * will most likely result in spontaneous results :( */ - this.setPageTitleAndBackground() + * will most likely result in spontaneous results :( + * + * note: defer to make sure the call stack is emptied before calling this, buying us a little more time */ + _.defer(_.bind(this.setPageTitleAndBackground, this)) + /* binds for getting started pulsation */ this.stream.bind("fetched", this.pulsateNewPostControl, this)