Merge remote-tracking branch 'origin/moderation-modal' into poast

poast
Alex Gleason 2022-09-11 21:59:50 -05:00
commit 631d8199b3
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 3 dodań i 5 usunięć

Wyświetl plik

@ -422,13 +422,11 @@ const untagUsers = (accountIds: string[], tags: string[]) =>
/** Synchronizes user tags to the backend. */
const setTags = (accountId: string, oldTags: string[], newTags: string[]) =>
(dispatch: AppDispatch) => {
async(dispatch: AppDispatch) => {
const diff = getTagDiff(oldTags, newTags);
return Promise.all([
dispatch(tagUsers([accountId], diff.added)),
dispatch(untagUsers([accountId], diff.removed)),
]);
await dispatch(tagUsers([accountId], diff.added));
await dispatch(untagUsers([accountId], diff.removed));
};
/** Synchronizes badges to the backend. */