File tree Expand file tree Collapse file tree
frontend/app/view/tsunami Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,20 +72,13 @@ class TsunamiViewModel extends WebViewModel {
7272 } , 300 ) ;
7373 }
7474
75- resyncController ( ) {
76- const prtn = RpcApi . ControllerResyncCommand ( TabRpcClient , {
77- tabid : globalStore . get ( atoms . staticTabId ) ,
78- blockid : this . blockId ,
79- forcerestart : false ,
80- } ) ;
81- prtn . catch ( ( e ) => console . log ( "error controller resync" , e ) ) ;
82- }
83-
84- private doControllerResync ( forceRestart : boolean , logContext : string ) {
85- if ( globalStore . get ( this . isRestarting ) ) {
86- return ;
75+ private doControllerResync ( forceRestart : boolean , logContext : string , triggerRestart : boolean = true ) {
76+ if ( triggerRestart ) {
77+ if ( globalStore . get ( this . isRestarting ) ) {
78+ return ;
79+ }
80+ this . triggerRestartAtom ( ) ;
8781 }
88- this . triggerRestartAtom ( ) ;
8982 const prtn = RpcApi . ControllerResyncCommand ( TabRpcClient , {
9083 tabid : globalStore . get ( atoms . staticTabId ) ,
9184 blockid : this . blockId ,
@@ -94,6 +87,10 @@ class TsunamiViewModel extends WebViewModel {
9487 prtn . catch ( ( e ) => console . log ( `error controller resync (${ logContext } )` , e ) ) ;
9588 }
9689
90+ resyncController ( ) {
91+ this . doControllerResync ( false , "resync" , false ) ;
92+ }
93+
9794 restartController ( ) {
9895 this . doControllerResync ( false , "restart" ) ;
9996 }
You can’t perform that action at this time.
0 commit comments