diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-11-02 08:37:17 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-11-02 10:29:53 -0500 |
commit | 1e7ac66e3bcc796c705ed6a833161cab6bd5b65d (patch) | |
tree | d97515b083f733cf2ea8096e3d62b253a1b8a2ae /web/react/stores/post_store.jsx | |
parent | b9a3ff74dd2b299ae4980922a6dcc55002662517 (diff) | |
download | chat-1e7ac66e3bcc796c705ed6a833161cab6bd5b65d.tar.gz chat-1e7ac66e3bcc796c705ed6a833161cab6bd5b65d.tar.bz2 chat-1e7ac66e3bcc796c705ed6a833161cab6bd5b65d.zip |
Some renaming
Diffstat (limited to 'web/react/stores/post_store.jsx')
-rw-r--r-- | web/react/stores/post_store.jsx | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/web/react/stores/post_store.jsx b/web/react/stores/post_store.jsx index 19b200ac8..0fe253310 100644 --- a/web/react/stores/post_store.jsx +++ b/web/react/stores/post_store.jsx @@ -14,7 +14,7 @@ var ActionTypes = Constants.ActionTypes; var CHANGE_EVENT = 'change'; var SELECTED_POST_CHANGE_EVENT = 'selected_post_change'; var EDIT_POST_EVENT = 'edit_post'; -var POST_LIST_JUMP_EVENT = 'post_list_jump'; +var POSTS_VIEW_JUMP_EVENT = 'post_list_jump'; class PostStoreClass extends EventEmitter { constructor() { @@ -30,11 +30,11 @@ class PostStoreClass extends EventEmitter { this.emitEditPost = this.emitEditPost.bind(this); this.addEditPostListener = this.addEditPostListener.bind(this); - this.removeEditPostListener = this.removeEditPostListener.bind(this); + this.removeEditPostListener = this.removeEditPostListner.bind(this); - this.emitPostListJump = this.emitPostListJump.bind(this); - this.addPostListJumpListener = this.addPostListJumpListener.bind(this); - this.removePostListJumpListener = this.removePostListJumpListener.bind(this); + this.emitPostsViewJump = this.emitPostsViewJump.bind(this); + this.addPostsViewJumpListener = this.addPostsViewJumpListener.bind(this); + this.removePostsViewJumpListener = this.removePostsViewJumpListener.bind(this); this.getCurrentPosts = this.getCurrentPosts.bind(this); this.storePosts = this.storePosts.bind(this); @@ -101,32 +101,32 @@ class PostStoreClass extends EventEmitter { this.on(EDIT_POST_EVENT, callback); } - removeEditPostListener(callback) { + removeEditPostListner(callback) { this.removeListener(EDIT_POST_EVENT, callback); } - emitPostListJump(type, post) { - this.emit(POST_LIST_JUMP_EVENT, type, post); + emitPostsViewJump(type, post) { + this.emit(POSTS_VIEW_JUMP_EVENT, type, post); } - addPostListJumpListener(callback) { - this.on(POST_LIST_JUMP_EVENT, callback); + addPostsViewJumpListener(callback) { + this.on(POSTS_VIEW_JUMP_EVENT, callback); } - removePostListJumpListener(callback) { - this.removeListener(POST_LIST_JUMP_EVENT, callback); + removePostsViewJumpListener(callback) { + this.removeListener(POSTS_VIEW_JUMP_EVENT, callback); } - jumpPostListBottom() { - this.emitPostListJump(Constants.PostListJumpTypes.BOTTOM, null); + jumpPostsViewToBottom() { + this.emitPostsViewJump(Constants.PostsViewJumpTypes.BOTTOM, null); } - jumpPostListToPost(post) { - this.emitPostListJump(Constants.PostListJumpTypes.POST, post); + jumpPostsViewToPost(post) { + this.emitPostsViewJump(Constants.PostsViewJumpTypes.POST, post); } - jumpPostListSidebarOpen() { - this.emitPostListJump(Constants.PostListJumpTypes.SIDEBAR_OPEN, null); + jumpPostsViewSidebarOpen() { + this.emitPostsViewJump(Constants.PostsViewJumpTypes.SIDEBAR_OPEN, null); } getCurrentPosts() { @@ -137,16 +137,16 @@ class PostStoreClass extends EventEmitter { } return null; } - storePosts(channelId, newPostList) { - if (isPostListNull(newPostList)) { + storePosts(channelId, newPostsView) { + if (isPostListNull(newPostsView)) { return; } var postList = makePostListNonNull(this.getPosts(channelId)); - for (const pid in newPostList.posts) { - if (newPostList.posts.hasOwnProperty(pid)) { - const np = newPostList.posts[pid]; + for (const pid in newPostsView.posts) { + if (newPostsView.posts.hasOwnProperty(pid)) { + const np = newPostsView.posts[pid]; if (np.delete_at === 0) { postList.posts[pid] = np; if (postList.order.indexOf(pid) === -1) { |