Fixed issue navigating away and back to tab view

This commit is contained in:
watsonb8
2019-12-23 19:06:03 -05:00
parent f691deab6a
commit 109457d6fa
3 changed files with 34 additions and 7 deletions

View File

@ -18,6 +18,7 @@
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand"
TabSizeOption="100"
SelectedTabIndex="{Binding SelectedTabIndex}"
HeaderBackgroundColor="#232323"
x:Name="TabView">
<tabView:TabViewControl.ItemSource>

View File

@ -34,6 +34,8 @@ namespace Aurora.Design.Views.Party
private BaseMedia _selectedMedia;
private ClientService _client;
private int _selectedTabIndex;
public PartyViewModel()
{
_members = new ObservableCollection<PartyMember>();
@ -59,6 +61,12 @@ namespace Aurora.Design.Views.Party
#region Properties
public int SelectedTabIndex
{
get { return _selectedTabIndex; }
set { SetProperty(ref _selectedTabIndex, value); }
}
/// <summary>
/// Publc property for the members list
/// </summary>
@ -119,6 +127,7 @@ namespace Aurora.Design.Views.Party
/// <returns></returns>
public override async Task OnActive()
{
OnPropertyChanged("SelectedTabIndex");
if (this._state == PartyState.Hosting ||
this._state == PartyState.InParty)
{