File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
components/fxa-client/src/state_machine Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -31,28 +31,34 @@ impl FirefoxAccount {
3131 /// On success, returns the new state.
3232 /// On error, the state will remain the same.
3333 pub fn process_event ( & mut self , event : FxaEvent ) -> Result < FxaState > {
34- match & self . auth_state {
34+ let was_in_auth_issues = matches ! ( self . auth_state, FxaState :: AuthIssues ) ;
35+
36+ let next_state = match & self . auth_state {
3537 FxaState :: Uninitialized => self . process_event_with_internal_state_machine (
3638 internal_machines:: UninitializedStateMachine ,
3739 event,
38- ) ,
40+ ) ? ,
3941 FxaState :: Disconnected => self . process_event_with_internal_state_machine (
4042 internal_machines:: DisconnectedStateMachine ,
4143 event,
42- ) ,
44+ ) ? ,
4345 FxaState :: Authenticating { .. } => self . process_event_with_internal_state_machine (
4446 internal_machines:: AuthenticatingStateMachine ,
4547 event,
46- ) ,
48+ ) ? ,
4749 FxaState :: Connected => self . process_event_with_internal_state_machine (
4850 internal_machines:: ConnectedStateMachine ,
4951 event,
50- ) ,
52+ ) ? ,
5153 FxaState :: AuthIssues => self . process_event_with_internal_state_machine (
5254 internal_machines:: AuthIssuesStateMachine ,
5355 event,
54- ) ,
56+ ) ?,
57+ } ;
58+ if !was_in_auth_issues && matches ! ( next_state, FxaState :: AuthIssues ) {
59+ self . on_auth_issues ( ) ;
5560 }
61+ Ok ( next_state)
5662 }
5763
5864 fn process_event_with_internal_state_machine < T : InternalStateMachine > (
You can’t perform that action at this time.
0 commit comments