memoize selected frame
This commit is contained in:
parent
374ec73fa4
commit
f3d1afcc96
1 changed files with 5 additions and 2 deletions
|
|
@ -28,9 +28,12 @@ app.pages.Stream = app.views.Base.extend({
|
|||
},
|
||||
|
||||
selectFrame : function(post){
|
||||
if(this.selectedPost == post) { return }
|
||||
this.selectedPost = post
|
||||
|
||||
this.$(".stream-frame-wrapper").removeClass("selected-frame")
|
||||
this.$(".stream-frame-wrapper[data-id=" + post.id +"]").addClass("selected-frame")
|
||||
this.interactionsView.setInteractions(post)
|
||||
this.$(".stream-frame-wrapper[data-id=" + this.selectedPost.id +"]").addClass("selected-frame")
|
||||
this.interactionsView.setInteractions(this.selectedPost)
|
||||
},
|
||||
|
||||
updateUrlState : function(){
|
||||
|
|
|
|||
Loading…
Reference in a new issue