mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 21:06:42 +07:00
updated nodes
This commit is contained in:
parent
74cd181530
commit
e584075484
1 changed files with 8 additions and 2 deletions
|
@ -32,10 +32,10 @@ import {
|
|||
getNodeRelated,
|
||||
} from './api';
|
||||
import { reqWrapper } from '../auth/sagas';
|
||||
import { flowSetNodes } from '../flow/actions';
|
||||
import { flowSetNodes, flowSetUpdated } from '../flow/actions';
|
||||
import { ERRORS } from '~/constants/errors';
|
||||
import { modalSetShown, modalShowDialog } from '../modal/actions';
|
||||
import { selectFlowNodes } from '../flow/selectors';
|
||||
import { selectFlowNodes, selectFlow } from '../flow/selectors';
|
||||
import { URLS } from '~/constants/urls';
|
||||
import { selectNode } from './selectors';
|
||||
import { IResultWithStatus, INode } from '../types';
|
||||
|
@ -130,6 +130,12 @@ function* onNodeLoad({ id, node_type }: ReturnType<typeof nodeLoadNode>) {
|
|||
yield put(nodeSetRelated(related || []));
|
||||
yield put(nodeSetLoadingComments(false));
|
||||
|
||||
const { updated } = yield select(selectFlow);
|
||||
|
||||
if (updated.some(item => item.id === id)) {
|
||||
yield put(flowSetUpdated(updated.filter(item => item.id !== id)));
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue