th: fix lints
parent
e11e09aeb7
commit
5119b775b0
|
@ -153,16 +153,16 @@ function apiStatusToTextMentions (state, status) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return set.union(status.mentions.filter(
|
return set.union(status.mentions.filter(
|
||||||
mention => mention.id !== me
|
mention => mention.id !== me,
|
||||||
).map(
|
).map(
|
||||||
mention => `@${mention.acct} `
|
mention => `@${mention.acct} `,
|
||||||
)).join('');
|
)).join('');
|
||||||
}
|
}
|
||||||
|
|
||||||
function apiStatusToTextHashtags (state, status) {
|
function apiStatusToTextHashtags (state, status) {
|
||||||
const text = unescapeHTML(status.content);
|
const text = unescapeHTML(status.content);
|
||||||
return ImmutableOrderedSet([]).union(recoverHashtags(status.tags, text).map(
|
return ImmutableOrderedSet([]).union(recoverHashtags(status.tags, text).map(
|
||||||
(name) => `#${name} `
|
(name) => `#${name} `,
|
||||||
)).join('');
|
)).join('');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@ function clearAll(state) {
|
||||||
map.set('quote_id', null);
|
map.set('quote_id', null);
|
||||||
map.update(
|
map.update(
|
||||||
'advanced_options',
|
'advanced_options',
|
||||||
map => map.mergeWith(overwrite, state.get('default_advanced_options'))
|
map => map.mergeWith(overwrite, state.get('default_advanced_options')),
|
||||||
);
|
);
|
||||||
map.set('privacy', state.get('default_privacy'));
|
map.set('privacy', state.get('default_privacy'));
|
||||||
map.set('sensitive', state.get('default_sensitive'));
|
map.set('sensitive', state.get('default_sensitive'));
|
||||||
|
@ -206,7 +206,7 @@ function continueThread (state, status) {
|
||||||
map.set('in_reply_to', status.id);
|
map.set('in_reply_to', status.id);
|
||||||
map.update(
|
map.update(
|
||||||
'advanced_options',
|
'advanced_options',
|
||||||
map => map.merge(new ImmutableMap({ do_not_federate: status.local_only }))
|
map => map.merge(new ImmutableMap({ do_not_federate: status.local_only })),
|
||||||
);
|
);
|
||||||
map.set('privacy', status.visibility);
|
map.set('privacy', status.visibility);
|
||||||
map.set('sensitive', false);
|
map.set('sensitive', false);
|
||||||
|
@ -460,6 +460,7 @@ export default function compose(state = initialState, action) {
|
||||||
return updateWithReply(state, action);
|
return updateWithReply(state, action);
|
||||||
case COMPOSE_REPLY_CANCEL:
|
case COMPOSE_REPLY_CANCEL:
|
||||||
state = state.setIn(['advanced_options', 'threaded_mode'], false);
|
state = state.setIn(['advanced_options', 'threaded_mode'], false);
|
||||||
|
// fall through
|
||||||
case COMPOSE_QUOTE_CANCEL:
|
case COMPOSE_QUOTE_CANCEL:
|
||||||
case COMPOSE_RESET:
|
case COMPOSE_RESET:
|
||||||
return state.withMutations(map => {
|
return state.withMutations(map => {
|
||||||
|
@ -474,7 +475,7 @@ export default function compose(state = initialState, action) {
|
||||||
map.set('poll', null);
|
map.set('poll', null);
|
||||||
map.update(
|
map.update(
|
||||||
'advanced_options',
|
'advanced_options',
|
||||||
map => map.mergeWith(overwrite, state.get('default_advanced_options'))
|
map => map.mergeWith(overwrite, state.get('default_advanced_options')),
|
||||||
);
|
);
|
||||||
map.set('idempotencyKey', uuid());
|
map.set('idempotencyKey', uuid());
|
||||||
});
|
});
|
||||||
|
@ -517,6 +518,7 @@ export default function compose(state = initialState, action) {
|
||||||
return item;
|
return item;
|
||||||
}));
|
}));
|
||||||
case INIT_MEDIA_EDIT_MODAL:
|
case INIT_MEDIA_EDIT_MODAL:
|
||||||
|
{
|
||||||
const media = state.get('media_attachments').find(item => item.get('id') === action.id);
|
const media = state.get('media_attachments').find(item => item.get('id') === action.id);
|
||||||
return state.set('media_modal', ImmutableMap({
|
return state.set('media_modal', ImmutableMap({
|
||||||
id: action.id,
|
id: action.id,
|
||||||
|
@ -525,6 +527,7 @@ export default function compose(state = initialState, action) {
|
||||||
focusY: media.getIn(['meta', 'focus', 'y'], 0),
|
focusY: media.getIn(['meta', 'focus', 'y'], 0),
|
||||||
dirty: false,
|
dirty: false,
|
||||||
}));
|
}));
|
||||||
|
}
|
||||||
case COMPOSE_CHANGE_MEDIA_DESCRIPTION:
|
case COMPOSE_CHANGE_MEDIA_DESCRIPTION:
|
||||||
return state.setIn(['media_modal', 'description'], action.description).setIn(['media_modal', 'dirty'], true);
|
return state.setIn(['media_modal', 'description'], action.description).setIn(['media_modal', 'dirty'], true);
|
||||||
case COMPOSE_CHANGE_MEDIA_FOCUS:
|
case COMPOSE_CHANGE_MEDIA_FOCUS:
|
||||||
|
@ -580,6 +583,7 @@ export default function compose(state = initialState, action) {
|
||||||
case COMPOSE_DOODLE_SET:
|
case COMPOSE_DOODLE_SET:
|
||||||
return state.mergeIn(['doodle'], action.options);
|
return state.mergeIn(['doodle'], action.options);
|
||||||
case REDRAFT:
|
case REDRAFT:
|
||||||
|
{
|
||||||
const do_not_federate = !!action.status.get('local_only');
|
const do_not_federate = !!action.status.get('local_only');
|
||||||
let text = action.raw_text || unescapeHTML(expandMentions(action.status));
|
let text = action.raw_text || unescapeHTML(expandMentions(action.status));
|
||||||
if (do_not_federate) text = text.replace(/ ?👁\ufe0f?\u200b?$/, '');
|
if (do_not_federate) text = text.replace(/ ?👁\ufe0f?\u200b?$/, '');
|
||||||
|
@ -596,7 +600,7 @@ export default function compose(state = initialState, action) {
|
||||||
map.set('language', action.status.get('language'));
|
map.set('language', action.status.get('language'));
|
||||||
map.update(
|
map.update(
|
||||||
'advanced_options',
|
'advanced_options',
|
||||||
map => map.merge(new ImmutableMap({ do_not_federate }))
|
map => map.merge(new ImmutableMap({ do_not_federate })),
|
||||||
);
|
);
|
||||||
map.set('id', null);
|
map.set('id', null);
|
||||||
|
|
||||||
|
@ -620,6 +624,7 @@ export default function compose(state = initialState, action) {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
case COMPOSE_SET_STATUS:
|
case COMPOSE_SET_STATUS:
|
||||||
return state.withMutations(map => {
|
return state.withMutations(map => {
|
||||||
map.set('id', action.status.get('id'));
|
map.set('id', action.status.get('id'));
|
||||||
|
|
Loading…
Reference in New Issue