File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,8 @@ export class BackgroundApp {
86
86
const nextState = index . get ( id ) ;
87
87
if ( nextState ) {
88
88
let state : State | null = nextState . stateFactory ( ) ;
89
- if ( lastState instanceof state . constructor ) {
89
+ if ( lastState instanceof state . constructor &&
90
+ lastState . stateSymbolId === state . stateSymbolId ) {
90
91
state = lastState . nextState ( id ) ;
91
92
}
92
93
if ( state ) {
Original file line number Diff line number Diff line change @@ -13,4 +13,8 @@ export abstract class State {
13
13
abstract nextState ( id : string ) : State | null ;
14
14
15
15
destroy ( ) { } ;
16
+
17
+ get stateSymbolId ( ) {
18
+ return this . symbolId ;
19
+ }
16
20
}
Original file line number Diff line number Diff line change @@ -43,11 +43,12 @@ export class StateManager {
43
43
if ( ! this . transitionInProgress ) {
44
44
this . transitionInProgress = id ;
45
45
}
46
- if ( this . lastTransition === id ) {
47
- const last = this . history [ this . history . length - 1 ] ;
48
- this . transitionInProgress = null ;
49
- return Promise . resolve ( last ) ;
50
- }
46
+ // Not really required because of the logic in directStateTransfer in the background app
47
+ // if (this.lastTransition === id) {
48
+ // const last = this.history[this.history.length - 1];
49
+ // this.transitionInProgress = null;
50
+ // return Promise.resolve(last);
51
+ // }
51
52
return ( ! isMetaNodeId ( id ) ?
52
53
this . state . directStateTransfer ( id ) :
53
54
this . state . nextState ( id ) )
You can’t perform that action at this time.
0 commit comments