diff options
author | Gabin Aureche <gabin.aureche@live.fr> | 2017-03-13 13:25:08 +0100 |
---|---|---|
committer | George Goldberg <george@gberg.me> | 2017-03-13 12:25:08 +0000 |
commit | fe38d6d5bb36e18ddefbe490cc21f48f4f4c8d81 (patch) | |
tree | b96d457cde64b7397f91028106e93a7f92a179bd /webapp/stores/search_store.jsx | |
parent | 482a0fb5fc248b1ec61db35299dc3e6d963ad5ab (diff) | |
download | chat-fe38d6d5bb36e18ddefbe490cc21f48f4f4c8d81.tar.gz chat-fe38d6d5bb36e18ddefbe490cc21f48f4f4c8d81.tar.bz2 chat-fe38d6d5bb36e18ddefbe490cc21f48f4f4c8d81.zip |
Add pinned posts (#4217)
Diffstat (limited to 'webapp/stores/search_store.jsx')
-rw-r--r-- | webapp/stores/search_store.jsx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/webapp/stores/search_store.jsx b/webapp/stores/search_store.jsx index 46a086ddb..49f8b3c2f 100644 --- a/webapp/stores/search_store.jsx +++ b/webapp/stores/search_store.jsx @@ -19,6 +19,7 @@ class SearchStoreClass extends EventEmitter { this.searchResults = null; this.isMentionSearch = false; this.isFlaggedPosts = false; + this.isPinnedPosts = false; this.isVisible = false; this.searchTerm = ''; } @@ -83,6 +84,10 @@ class SearchStoreClass extends EventEmitter { return this.isFlaggedPosts; } + getIsPinnedPosts() { + return this.isPinnedPosts; + } + storeSearchTerm(term) { this.searchTerm = term; } @@ -91,10 +96,11 @@ class SearchStoreClass extends EventEmitter { return this.searchTerm; } - storeSearchResults(results, isMentionSearch, isFlaggedPosts) { + storeSearchResults(results, isMentionSearch, isFlaggedPosts, isPinnedPosts) { this.searchResults = results; this.isMentionSearch = isMentionSearch; this.isFlaggedPosts = isFlaggedPosts; + this.isPinnedPosts = isPinnedPosts; } deletePost(post) { @@ -120,7 +126,7 @@ SearchStore.dispatchToken = AppDispatcher.register((payload) => { switch (action.type) { case ActionTypes.RECEIVED_SEARCH: - SearchStore.storeSearchResults(action.results, action.is_mention_search, action.is_flagged_posts); + SearchStore.storeSearchResults(action.results, action.is_mention_search, action.is_flagged_posts, action.is_pinned_posts); SearchStore.emitSearchChange(); break; case ActionTypes.RECEIVED_SEARCH_TERM: |