Skip to content

Commit

Permalink
Initialyze the SessionService before using it
Browse files Browse the repository at this point in the history
  • Loading branch information
mserra-github committed Nov 22, 2023
1 parent de3e90c commit 65854dc
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ public abstract class ApplicationBaseViewModel : HaveObjectChangedTracking, IApp
/// <param name="sessionService">The <see cref="ISessionService" /></param>
protected ApplicationBaseViewModel(ISessionService sessionService)
{
this.SessionService = sessionService;

this.Disposables.Add(CDPMessageBus.Current.Listen<SessionEvent>()
.Where(x => x.Session == sessionService?.Session && x.Status == SessionStatus.EndUpdate)
.Where(x => x.Session == this.SessionService?.Session && x.Status == SessionStatus.EndUpdate)
.SubscribeAsync(_ => this.OnSessionRefreshed()));

this.SessionService = sessionService;
}

/// <summary>
Expand Down

0 comments on commit 65854dc

Please sign in to comment.