fixes the account chooser page state
This commit is contained in:
parent
8ac1a62512
commit
03209200af
2 changed files with 9 additions and 22 deletions
|
|
@ -14,6 +14,7 @@
|
||||||
<ListView x:Name="AccountListView"
|
<ListView x:Name="AccountListView"
|
||||||
SeparatorVisibility="Default"
|
SeparatorVisibility="Default"
|
||||||
VerticalOptions="FillAndExpand"
|
VerticalOptions="FillAndExpand"
|
||||||
|
ItemsSource="{x:Static local:MainSettings.AccountList}"
|
||||||
>
|
>
|
||||||
<ListView.Header>
|
<ListView.Header>
|
||||||
<StackLayout Orientation="Horizontal">
|
<StackLayout Orientation="Horizontal">
|
||||||
|
|
|
||||||
|
|
@ -14,37 +14,24 @@ namespace BookAStar.Pages.UserProfile
|
||||||
|
|
||||||
public partial class AccountChooserPage : ContentPage
|
public partial class AccountChooserPage : ContentPage
|
||||||
{
|
{
|
||||||
public ICommand RemoteSettingsRefreshCommand { get; private set; }
|
|
||||||
|
|
||||||
public AccountChooserPage ()
|
public AccountChooserPage ()
|
||||||
{
|
{
|
||||||
InitializeComponent ();
|
InitializeComponent ();
|
||||||
|
|
||||||
AccountListView.ItemsSource = MainSettings.AccountList;
|
|
||||||
|
|
||||||
this.Musical = MainSettings.Musical;
|
|
||||||
this.Environ = MainSettings.Environ;
|
|
||||||
this.BindingContext = this;
|
|
||||||
|
|
||||||
AddAccountBtn.Clicked += AddAccountBtn_Clicked;
|
AddAccountBtn.Clicked += AddAccountBtn_Clicked;
|
||||||
|
|
||||||
// avatarImage.
|
|
||||||
//RemoveAccountBouton.Clicked += RemoveAccountBouton_Clicked;
|
//RemoveAccountBouton.Clicked += RemoveAccountBouton_Clicked;
|
||||||
|
|
||||||
AccountListView.ItemSelected += Accounts_ItemSelected;
|
AccountListView.ItemSelected += Accounts_ItemSelected;
|
||||||
DumpParam = new RelayGesture((g, x) =>
|
// MainSettings.UserChanged += MainSettings_UserChanged;
|
||||||
{
|
}
|
||||||
if (g.GestureType == GestureType.Swipe && g.Direction == Directionality.Left)
|
// Should be useless
|
||||||
{
|
private void MainSettings_UserChanged(object sender, EventArgs e)
|
||||||
RemoveAccount();
|
{
|
||||||
}
|
AccountListView.SelectedItem = MainSettings.CurrentUser;
|
||||||
});
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public RelayGesture DumpParam { get; set; }
|
|
||||||
public ObservableCollection<User> Accounts { get; private set; }
|
|
||||||
public Dictionary<string, double> Musical { get; private set; }
|
|
||||||
public Dictionary<string, double> Environ { get; private set; }
|
|
||||||
|
|
||||||
private void Accounts_ItemSelected(object sender, SelectedItemChangedEventArgs e)
|
private void Accounts_ItemSelected(object sender, SelectedItemChangedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
@ -68,7 +55,6 @@ namespace BookAStar.Pages.UserProfile
|
||||||
protected override void OnAppearing()
|
protected override void OnAppearing()
|
||||||
{
|
{
|
||||||
base.OnAppearing();
|
base.OnAppearing();
|
||||||
AccountListView.SelectedItem = MainSettings.CurrentUser;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AddAccountBtn_Clicked(object sender, EventArgs e)
|
private void AddAccountBtn_Clicked(object sender, EventArgs e)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue