private async Task SetConnectionLostState() { var state = await connectionStateSubject.FirstAsync(); if (state == Enums.ConnectionState.ConnectionLost) { return; } connectionStateSubject.OnNext(Enums.ConnectionState.ConnectionLost); }
/// <summary> /// Returns the top modal from the current modal stack. /// </summary> /// <returns></returns> /// <exception cref="NotImplementedException"></exception> public IObservable <IPageViewModel> TopModal() => _modalStack.FirstAsync().Select(x => x.Last());
/// <summary> /// Returns the top page from the current navigation stack. /// </summary> /// <returns></returns> /// <exception cref="NotImplementedException"></exception> public IObservable <IPageViewModel> TopPage() => _pageStack.FirstAsync().Select(x => x.Last());
/// <summary> /// Returns the top page from the current navigation stack. /// </summary> /// <returns>An observable that signals the top page view model.</returns> public IObservable <IViewModel> TopPage() => _navigationSubject.FirstAsync().Select(x => x[x.Count - 1]);
/// <summary> /// Returns the top modal from the current modal stack. /// </summary> /// <returns>An observable that signals the top modal view model.</returns> public IObservable <IViewModel> TopModal() => _modalSubject.FirstAsync().Select(x => x[x.Count - 1]);