remove reInit method

This commit is contained in:
王劲鹏 2020-02-27 17:15:22 +08:00 committed by osborn
parent e9197ec173
commit a5f122b627
3 changed files with 7 additions and 10 deletions

View File

@ -22,6 +22,7 @@
#import <DoricCore/Doric.h> #import <DoricCore/Doric.h>
#import <DoricCore/DoricContextManager.h> #import <DoricCore/DoricContextManager.h>
#import <DoricCore/DoricNativeDriver.h> #import <DoricCore/DoricNativeDriver.h>
#import <DoricCore/DoricConstant.h>
#import "DoricDev.h" #import "DoricDev.h"
#import "DoricWSClient.h" #import "DoricWSClient.h"
@ -105,11 +106,15 @@ - (void)onEnterDebugEvent {
- (void)onStopDebugEvent { - (void)onStopDebugEvent {
_context.driver = [DoricNativeDriver instance]; _context.driver = [DoricNativeDriver instance];
[_context reInit]; _context.rootNode.viewId = nil;
[_context callEntity:DORIC_ENTITY_INIT, _context.initialParams, nil];
[_context callEntity:DORIC_ENTITY_CREATE, nil];
} }
- (void)onDebuggerReadyEvent { - (void)onDebuggerReadyEvent {
_context.driver = _driver; _context.driver = _driver;
[_context reInit]; _context.rootNode.viewId = nil;
[_context callEntity:DORIC_ENTITY_INIT, _context.initialParams, nil];
[_context callEntity:DORIC_ENTITY_CREATE, nil];
} }
@end @end

View File

@ -55,8 +55,6 @@ NS_ASSUME_NONNULL_BEGIN
- (void)reload:(NSString *)script; - (void)reload:(NSString *)script;
- (void)reInit;
- (void)onShow; - (void)onShow;
- (void)onHidden; - (void)onHidden;

View File

@ -96,12 +96,6 @@ - (void)reload:(NSString *)script {
[self onShow]; [self onShow];
} }
- (void)reInit {
self.rootNode.viewId = nil;
[self callEntity:DORIC_ENTITY_INIT, self.initialParams, nil];
[self callEntity:DORIC_ENTITY_CREATE, nil];
}
- (void)onShow { - (void)onShow {
[self callEntity:DORIC_ENTITY_SHOW, nil]; [self callEntity:DORIC_ENTITY_SHOW, nil];
} }