Refactor selectComposeSuggestion so that different paths can be updated

This commit is contained in:
Thibaut Girka
2019-04-11 17:07:06 +02:00
committed by ThibG
parent 1c0402c103
commit 3a671470ec
3 changed files with 11 additions and 8 deletions

View File

@@ -407,7 +407,7 @@ export function readyComposeSuggestionsAccounts(token, accounts) {
};
};
export function selectComposeSuggestion(position, token, suggestion) {
export function selectComposeSuggestion(position, token, suggestion, path) {
return (dispatch, getState) => {
let completion;
if (typeof suggestion === 'object' && suggestion.id) {
@@ -424,6 +424,7 @@ export function selectComposeSuggestion(position, token, suggestion) {
position,
token,
completion,
path,
});
};
};