Composer: Remove preselectDate

This value is only used to track when a reply happens. On soapbox-fe, a reply causes a new ComposeForm to mount, so we can track it that way instead.
merge-requests/25/head
Alex Gleason 4 years ago
parent 188067ac48
commit e06f8ce894
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7

@ -51,7 +51,6 @@ class ComposeForm extends ImmutablePureComponent {
spoilerText: PropTypes.string,
focusDate: PropTypes.instanceOf(Date),
caretPosition: PropTypes.number,
preselectDate: PropTypes.instanceOf(Date),
isSubmitting: PropTypes.bool,
isChangingUpload: PropTypes.bool,
isUploading: PropTypes.bool,

@ -19,7 +19,6 @@ const mapStateToProps = state => ({
privacy: state.getIn(['compose', 'privacy']),
focusDate: state.getIn(['compose', 'focusDate']),
caretPosition: state.getIn(['compose', 'caretPosition']),
preselectDate: state.getIn(['compose', 'preselectDate']),
isSubmitting: state.getIn(['compose', 'is_submitting']),
isChangingUpload: state.getIn(['compose', 'is_changing_upload']),
isUploading: state.getIn(['compose', 'is_uploading']),

@ -54,7 +54,6 @@ const initialState = ImmutableMap({
text: '',
focusDate: null,
caretPosition: null,
preselectDate: null,
in_reply_to: null,
is_composing: false,
is_submitting: false,
@ -247,7 +246,6 @@ export default function compose(state = initialState, action) {
map.set('privacy', privacyPreference(action.status.get('visibility'), state.get('default_privacy')));
map.set('focusDate', new Date());
map.set('caretPosition', null);
map.set('preselectDate', new Date());
map.set('idempotencyKey', uuid());
if (action.status.get('spoiler_text').length > 0) {

Loading…
Cancel
Save