Re-implemented autosuggestions component for the compose form

Fix #205, fix #156, fix #124
This commit is contained in:
Eugen Rochko 2016-12-14 18:21:31 +01:00
parent 4284093aa3
commit b27066e154
16 changed files with 787 additions and 142 deletions

View file

@ -19,7 +19,7 @@ const makeMapStateToProps = () => {
return {
text: state.getIn(['compose', 'text']),
suggestion_token: state.getIn(['compose', 'suggestion_token']),
suggestions: state.getIn(['compose', 'suggestions']).toJS(),
suggestions: state.getIn(['compose', 'suggestions']),
sensitive: state.getIn(['compose', 'sensitive']),
unlisted: state.getIn(['compose', 'unlisted']),
is_submitting: state.getIn(['compose', 'is_submitting']),
@ -53,8 +53,8 @@ const mapDispatchToProps = function (dispatch) {
dispatch(fetchComposeSuggestions(token));
},
onSuggestionSelected (position, accountId) {
dispatch(selectComposeSuggestion(position, accountId));
onSuggestionSelected (position, token, accountId) {
dispatch(selectComposeSuggestion(position, token, accountId));
},
onChangeSensitivity (checked) {