mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-20 07:26:19 +00:00
Revert "Merge branch 'main' into furnisettingeditor-pr"
This reverts commitdfbfb1c2c1, reversing changes made to07702c44d0.
This commit is contained in:
@@ -81,14 +81,9 @@ export const WiredActionFurniToFurniView: FC<{}> = () =>
|
||||
if(mode === 'move' && !canEditMove) return;
|
||||
if(mode === 'target' && !canEditTarget) return;
|
||||
|
||||
const nextMoveIds = (selectionMode === 'move') ? [ ...furniIds ] : [ ...moveFurniIds ];
|
||||
const nextTargetIds = (selectionMode === 'target') ? [ ...furniIds ] : [ ...targetFurniIds ];
|
||||
|
||||
setMoveFurniIds(nextMoveIds);
|
||||
setTargetFurniIds(nextTargetIds);
|
||||
setSelectionMode(mode);
|
||||
setFurniIds([ ...(mode === 'move' ? nextMoveIds : nextTargetIds) ]);
|
||||
}, [ selectionMode, furniIds, moveSource, targetSource, moveFurniIds, targetFurniIds, setFurniIds ]);
|
||||
setFurniIds([ ...(mode === 'move' ? moveFurniIds : targetFurniIds) ]);
|
||||
}, [ moveSource, targetSource, moveFurniIds, targetFurniIds, setFurniIds ]);
|
||||
|
||||
useEffect(() =>
|
||||
{
|
||||
@@ -158,16 +153,10 @@ export const WiredActionFurniToFurniView: FC<{}> = () =>
|
||||
|
||||
const save = useCallback(() =>
|
||||
{
|
||||
const nextMoveIds = (selectionMode === 'move') ? [ ...furniIds ] : [ ...moveFurniIds ];
|
||||
const nextTargetIds = (selectionMode === 'target') ? [ ...furniIds ] : [ ...targetFurniIds ];
|
||||
|
||||
setMoveFurniIds(nextMoveIds);
|
||||
setTargetFurniIds(nextTargetIds);
|
||||
|
||||
if(selectionMode === 'target')
|
||||
{
|
||||
setSelectionMode('move');
|
||||
setFurniIds([ ...nextMoveIds ]);
|
||||
setFurniIds([ ...moveFurniIds ]);
|
||||
}
|
||||
|
||||
setIntParams([
|
||||
@@ -175,8 +164,8 @@ export const WiredActionFurniToFurniView: FC<{}> = () =>
|
||||
targetSource
|
||||
]);
|
||||
|
||||
setStringParam(serializeIds(nextTargetIds));
|
||||
}, [ selectionMode, furniIds, moveFurniIds, moveSource, targetSource, targetFurniIds, setFurniIds, setIntParams, setStringParam ]);
|
||||
setStringParam(serializeIds(targetFurniIds));
|
||||
}, [ selectionMode, moveFurniIds, moveSource, targetSource, targetFurniIds, setFurniIds, setIntParams, setStringParam ]);
|
||||
|
||||
const selectionLimit = trigger?.maximumItemSelectionCount ?? 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user