Skip to content

Commit

Permalink
fix(core): remove batch call redundant param
Browse files Browse the repository at this point in the history
  • Loading branch information
zoomchan-cxj committed Apr 17, 2022
1 parent ab426a6 commit 784ea7c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
5 changes: 2 additions & 3 deletions core/js/bridge/android/native2js.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,9 @@ global.hippyBridge = (_action, _callObj) => {
}
case 'destroyInstance': {
global.Hippy.emit('destroyInstance', callObj);
const renderId = Date.now().toString();
Hippy.bridge.callNative('UIManagerModule', 'startBatch', renderId);
Hippy.bridge.callNative('UIManagerModule', 'startBatch');
Hippy.bridge.callNative('UIManagerModule', 'deleteNode', callObj, [{ id: callObj }]);
Hippy.bridge.callNative('UIManagerModule', 'endBatch', renderId);
Hippy.bridge.callNative('UIManagerModule', 'endBatch');
delete __GLOBAL__.nodeIdCache[callObj];
delete __GLOBAL__.nodeTreeCache[callObj];
__GLOBAL__.destroyInstanceList[callObj] = true;
Expand Down
5 changes: 2 additions & 3 deletions core/js/bridge/ios/native2js.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,9 @@ __fbBatchedBridge.callFunctionReturnFlushedQueue = (module, method, args) => {
}
} else if (method === 'unmountApplicationComponentAtRootTag') {
global.Hippy.emit('destroyInstance', args[0]);
const renderId = Date.now().toString();
Hippy.bridge.callNative('UIManagerModule', 'startBatch', renderId);
Hippy.bridge.callNative('UIManagerModule', 'startBatch');
Hippy.bridge.callNative('UIManagerModule', 'removeRootView', args[0]);
Hippy.bridge.callNative('UIManagerModule', 'endBatch', renderId);
Hippy.bridge.callNative('UIManagerModule', 'endBatch');
delete __GLOBAL__.nodeIdCache[args[0]];
delete __GLOBAL__.nodeTreeCache[args[0]];
delete __GLOBAL__.nodeParamCache[args[0]];
Expand Down
4 changes: 2 additions & 2 deletions core/src/napi/jsc/native_source_code_ios.cc

Large diffs are not rendered by default.

Loading

0 comments on commit 784ea7c

Please sign in to comment.