Updated comment composer to include mentions on first focus

This will (somewhat & temporarily) fix the issue of people not getting notifications when others comment via inline comment composer in the timeline

• Updated:
- comment composer to include mentions on first focus

• Todo:
- Test on develop
- Work in backend to resolve issue completely of non-mentioned people not getting notified on their own replies
This commit is contained in:
mgabdev 2020-06-08 19:46:22 -04:00
parent 9f8f1999f5
commit efd9d684e0
2 changed files with 5 additions and 6 deletions

View File

@ -100,12 +100,7 @@ export function changeCompose(text, markdown, replyId, isStandalone, caretPositi
dispatch({
type: COMPOSE_REPLY,
status: status,
})
dispatch({
type: COMPOSE_CHANGE,
text: text,
markdown: markdown,
caretPosition: caretPosition,
})
} else if (existingText.length > 0 && text.trim().length > 0) {
dispatch(openModal('CONFIRM', {

View File

@ -264,7 +264,6 @@ export default function compose(state = initialState, action) {
return state.withMutations(map => {
map.set('in_reply_to', action.status.get('id'));
map.set('quote_of_id', null);
map.set('text', statusToTextMentions(state, action.status));
map.set('privacy', privacyPreference(action.status.get('visibility'), state.get('default_privacy')));
map.set('focusDate', new Date());
map.set('caretPosition', null);
@ -272,6 +271,11 @@ export default function compose(state = initialState, action) {
map.set('idempotencyKey', uuid());
map.set('spoiler', false);
map.set('spoiler_text', '');
if (action.text) {
map.set('text', `${statusToTextMentions(state, action.status)}${action.text}`);
} else {
map.set('text', statusToTextMentions(state, action.status));
}
});
case COMPOSE_QUOTE:
return state.withMutations(map => {