PLT-3506 Added flagged posts functionality (#3679)

* Added flagged posts functionality

* UI Improvements to flags (#3697)

* Added flag functionality for mobile

* Updating flagged text (#3699)

* Add back button to RHS thread when coming from flagged posts

* Updating position of flags (#3708)

* Plt 3506 - Reverting flag position (#3724)

* Revert "Updating position of flags (#3708)"

This reverts commit aaa05632c5d9eda35a048300a5bd7e99584c5b58.

* Fixing the icon in search

* Help text and white space improvements (#3730)

* Updatng help text and some white spacing.

* Updating help text
Этот коммит содержится в:
Joram Wilander
2016-08-04 11:38:09 -04:00
коммит произвёл enahum
родитель 9b50b50283
Коммит 0184d6059b
38 изменённых файлов: 1078 добавлений и 104 удалений

Просмотреть файл

@@ -441,8 +441,8 @@ class PostStoreClass extends EventEmitter {
return threadPosts;
}
emitSelectedPostChange(fromSearch) {
this.emit(SELECTED_POST_CHANGE_EVENT, fromSearch);
emitSelectedPostChange(fromSearch, fromFlaggedPosts) {
this.emit(SELECTED_POST_CHANGE_EVENT, fromSearch, fromFlaggedPosts);
}
addSelectedPostChangeListener(callback) {
@@ -599,7 +599,7 @@ PostStore.dispatchToken = AppDispatcher.register((payload) => {
break;
case ActionTypes.RECEIVED_POST_SELECTED:
PostStore.storeSelectedPostId(action.postId);
PostStore.emitSelectedPostChange(action.from_search);
PostStore.emitSelectedPostChange(action.from_search, action.from_flagged_posts);
break;
default:
}

Просмотреть файл

@@ -18,6 +18,7 @@ class SearchStoreClass extends EventEmitter {
this.searchResults = null;
this.isMentionSearch = false;
this.isFlaggedPosts = false;
this.searchTerm = '';
}
@@ -77,6 +78,10 @@ class SearchStoreClass extends EventEmitter {
return this.isMentionSearch;
}
getIsFlaggedPosts() {
return this.isFlaggedPosts;
}
storeSearchTerm(term) {
this.searchTerm = term;
}
@@ -85,9 +90,10 @@ class SearchStoreClass extends EventEmitter {
return this.searchTerm;
}
storeSearchResults(results, isMentionSearch) {
storeSearchResults(results, isMentionSearch, isFlaggedPosts) {
this.searchResults = results;
this.isMentionSearch = isMentionSearch;
this.isFlaggedPosts = isFlaggedPosts;
}
}
@@ -98,7 +104,7 @@ SearchStore.dispatchToken = AppDispatcher.register((payload) => {
switch (action.type) {
case ActionTypes.RECEIVED_SEARCH:
SearchStore.storeSearchResults(action.results, action.is_mention_search);
SearchStore.storeSearchResults(action.results, action.is_mention_search, action.is_flagged_posts);
SearchStore.emitSearchChange();
break;
case ActionTypes.RECEIVED_SEARCH_TERM: