PERF: Paginate public polls.

This commit is contained in:
Guo Xiang Tan
2016-06-09 21:33:17 +08:00
parent e66c51fd85
commit a36203ff78
15 changed files with 102 additions and 91 deletions

View File

@ -29,10 +29,6 @@ function initializePolls(api) {
const post = this.get('model.postStream').findLoadedPost(msg.post_id);
if (post) {
post.set('polls', msg.polls);
if (msg.user) {
post.set(`polls_voters.${msg.user.id}`, msg.user);
}
}
});
},
@ -80,7 +76,6 @@ function initializePolls(api) {
const post = helper.getModel();
api.preventCloak(post.id);
const votes = post.get('polls_votes') || {};
post.set("polls_voters", (post.get("polls_voters") || {}));
post.pollsChanged();