Minor code cleanup (#10613)
This commit is contained in:
		
					parent
					
						
							
								c9441bf82e
							
						
					
				
			
			
				commit
				
					
						bdec58b514
					
				
			
		
					 3 changed files with 20 additions and 26 deletions
				
			
		|  | @ -1,6 +1,5 @@ | |||
| import { connect } from 'react-redux'; | ||||
| import ComposeForm from '../components/compose_form'; | ||||
| import { uploadCompose } from '../../../actions/compose'; | ||||
| import { | ||||
|   changeCompose, | ||||
|   submitCompose, | ||||
|  | @ -9,21 +8,21 @@ import { | |||
|   selectComposeSuggestion, | ||||
|   changeComposeSpoilerText, | ||||
|   insertEmojiCompose, | ||||
|   uploadCompose, | ||||
| } from '../../../actions/compose'; | ||||
| 
 | ||||
| const mapStateToProps = state => ({ | ||||
|   text: state.getIn(['compose', 'text']), | ||||
|   suggestion_token: state.getIn(['compose', 'suggestion_token']), | ||||
|   suggestions: state.getIn(['compose', 'suggestions']), | ||||
|   spoiler: state.getIn(['compose', 'spoiler']), | ||||
|   spoiler_text: state.getIn(['compose', 'spoiler_text']), | ||||
|   spoilerText: state.getIn(['compose', 'spoiler_text']), | ||||
|   privacy: state.getIn(['compose', 'privacy']), | ||||
|   focusDate: state.getIn(['compose', 'focusDate']), | ||||
|   caretPosition: state.getIn(['compose', 'caretPosition']), | ||||
|   preselectDate: state.getIn(['compose', 'preselectDate']), | ||||
|   is_submitting: state.getIn(['compose', 'is_submitting']), | ||||
|   is_changing_upload: state.getIn(['compose', 'is_changing_upload']), | ||||
|   is_uploading: state.getIn(['compose', 'is_uploading']), | ||||
|   isChangingUpload: state.getIn(['compose', 'is_changing_upload']), | ||||
|   isUploading: state.getIn(['compose', 'is_uploading']), | ||||
|   showSearch: state.getIn(['search', 'submitted']) && !state.getIn(['search', 'hidden']), | ||||
|   anyMedia: state.getIn(['compose', 'media_attachments']).size > 0, | ||||
| }); | ||||
|  | @ -46,8 +45,8 @@ const mapDispatchToProps = (dispatch) => ({ | |||
|     dispatch(fetchComposeSuggestions(token)); | ||||
|   }, | ||||
| 
 | ||||
|   onSuggestionSelected (position, token, accountId) { | ||||
|     dispatch(selectComposeSuggestion(position, token, accountId)); | ||||
|   onSuggestionSelected (position, token, suggestion) { | ||||
|     dispatch(selectComposeSuggestion(position, token, suggestion)); | ||||
|   }, | ||||
| 
 | ||||
|   onChangeSpoilerText (checked) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue