Skip to content

Commit

Permalink
Reduce composer differences with upstream and simplify code (#2518)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored Dec 18, 2023
1 parent 1885637 commit 3d3fa75
Show file tree
Hide file tree
Showing 7 changed files with 177 additions and 252 deletions.
9 changes: 5 additions & 4 deletions app/javascript/flavours/glitch/actions/compose.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,9 @@ export function submitCompose(routerHistory) {
return;
}

// To make the app more responsive, immediately get the status into the columns

const insertIfOnline = (timelineId) => {
// To make the app more responsive, immediately push the status
// into the columns
const insertIfOnline = timelineId => {
const timeline = getState().getIn(['timelines', timelineId]);

if (timeline && timeline.get('items').size > 0 && timeline.getIn(['items', 0]) !== null && timeline.get('online')) {
Expand Down Expand Up @@ -662,8 +662,9 @@ export function selectComposeSuggestion(position, token, suggestion, path) {
return (dispatch, getState) => {
let completion;
if (suggestion.type === 'emoji') {
dispatch(useEmoji(suggestion));
completion = suggestion.native || suggestion.colons;

dispatch(useEmoji(suggestion));
} else if (suggestion.type === 'hashtag') {
completion = `#${suggestion.name}`;
} else if (suggestion.type === 'account') {
Expand Down
Loading

0 comments on commit 3d3fa75

Please sign in to comment.