@masterteam/delegations 0.0.40 → 0.0.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -122,12 +122,13 @@ let DelegationSessionState = class DelegationSessionState {
122
122
  constructor() {
123
123
  this.actions$
124
124
  .pipe(ofActionSuccessful(GatewayLoginSuccessShell))
125
- .subscribe(() => this.store.dispatch([
126
- // Reset the prompt flag for the new login, then (re)load candidates so
127
- // the "delegations available" prompt fires exactly once after login.
128
- new MarkDelegationPrompted(false),
129
- new LoadDelegationCandidates(),
130
- ]));
125
+ .subscribe(() =>
126
+ // Only (re)load candidates here. The prompt flag is NOT reset on login
127
+ // because the host re-dispatches "Login Success" on every bootstrap /
128
+ // refresh — resetting here would re-prompt on each refresh. The flag is
129
+ // reset on explicit logout / user / app switch (see EndDelegationSession),
130
+ // so the prompt fires once per real login.
131
+ this.store.dispatch(new LoadDelegationCandidates()));
131
132
  this.actions$
132
133
  .pipe(ofActionDispatched(GatewayLogoutShell))
133
134
  .subscribe(() => this.store.dispatch(new EndDelegationSession('Logout')));