sforkowany z mirror/soapbox
Merge remote-tracking branch 'origin/moderation-modal' into poast
commit
631d8199b3
|
@ -422,13 +422,11 @@ const untagUsers = (accountIds: string[], tags: string[]) =>
|
||||||
|
|
||||||
/** Synchronizes user tags to the backend. */
|
/** Synchronizes user tags to the backend. */
|
||||||
const setTags = (accountId: string, oldTags: string[], newTags: string[]) =>
|
const setTags = (accountId: string, oldTags: string[], newTags: string[]) =>
|
||||||
(dispatch: AppDispatch) => {
|
async(dispatch: AppDispatch) => {
|
||||||
const diff = getTagDiff(oldTags, newTags);
|
const diff = getTagDiff(oldTags, newTags);
|
||||||
|
|
||||||
return Promise.all([
|
await dispatch(tagUsers([accountId], diff.added));
|
||||||
dispatch(tagUsers([accountId], diff.added)),
|
await dispatch(untagUsers([accountId], diff.removed));
|
||||||
dispatch(untagUsers([accountId], diff.removed)),
|
|
||||||
]);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Synchronizes badges to the backend. */
|
/** Synchronizes badges to the backend. */
|
||||||
|
|
Ładowanie…
Reference in New Issue