Migrate to external library for interacting with API

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-08-06 19:52:36 +02:00
parent 3b87810f85
commit 32c68a9221
89 changed files with 364 additions and 710 deletions

View File

@ -567,7 +567,7 @@ const fetchComposeSuggestionsAccounts = throttle((dispatch, getState, composeId,
cancelFetchComposeSuggestions = new AbortController();
}
return getClient(getState()).accounts.searchAccounts(token.slice(1), { resolve: false, limit: 10 }) // WIP: signal
return getClient(getState()).accounts.searchAccounts(token.slice(1), { resolve: false, limit: 10 }, { signal })
.then(response => {
dispatch(importFetchedAccounts(response));
dispatch(readyComposeSuggestionsAccounts(composeId, token, response));