mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-14 16:28:59 +00:00
[Glitch] Fix hashtag completion not being inserted correctly
Port 6d8c43ab85 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@@ -709,8 +709,8 @@ export function selectComposeSuggestion(position, token, suggestion, path) {
|
|||||||
|
|
||||||
dispatch(useEmoji(suggestion));
|
dispatch(useEmoji(suggestion));
|
||||||
} else if (suggestion.type === 'hashtag') {
|
} else if (suggestion.type === 'hashtag') {
|
||||||
completion = suggestion.name.slice(token.length - 1);
|
completion = token + suggestion.name.slice(token.length - 1);
|
||||||
startPosition = position + token.length;
|
startPosition = position - 1;
|
||||||
} else if (suggestion.type === 'account') {
|
} else if (suggestion.type === 'account') {
|
||||||
completion = `@${getState().getIn(['accounts', suggestion.id, 'acct'])}`;
|
completion = `@${getState().getIn(['accounts', suggestion.id, 'acct'])}`;
|
||||||
startPosition = position - 1;
|
startPosition = position - 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user