From 8b8f73deb109ae2058c6ec58b71757e4f4854c98 Mon Sep 17 00:00:00 2001 From: Developer <> Date: Wed, 10 Feb 2021 13:29:48 -0500 Subject: [PATCH] Added back account autofill mention in composer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Added: - account autofill mention in composer after removing for performance reasons • Updated: - throttle for account search function --- app/javascript/gabsocial/actions/compose.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/javascript/gabsocial/actions/compose.js b/app/javascript/gabsocial/actions/compose.js index bcccc8ba..dd7b5ccc 100644 --- a/app/javascript/gabsocial/actions/compose.js +++ b/app/javascript/gabsocial/actions/compose.js @@ -537,8 +537,6 @@ const fetchComposeSuggestionsAccounts = throttle((dispatch, getState, token) => cancelFetchComposeSuggestionsAccounts() } - return false - api(getState).get('/api/v1/accounts/search', { cancelToken: new CancelToken(cancel => { cancelFetchComposeSuggestionsAccounts = cancel @@ -556,7 +554,7 @@ const fetchComposeSuggestionsAccounts = throttle((dispatch, getState, token) => // dispatch(showAlertForError(error)) } }) -}, 200, { leading: true, trailing: true }) +}, 1000, { leading: true, trailing: true }) const fetchComposeSuggestionsEmojis = (dispatch, getState, token) => { const results = emojiSearch(token.replace(':', ''), { maxResults: 5 })