feature: refresh profile
This commit is contained in:
parent
d743e5e393
commit
3f884e9b12
@ -30,6 +30,9 @@
|
||||
Text="{Binding UserProfileName}" TextColor="{DynamicResource TextColor}"/>
|
||||
<Label Grid.Row="2" VerticalOptions="Center" FontSize="Small"
|
||||
Text="{Binding UserProfileId}" TextColor="{DynamicResource SubTextColor}"/>
|
||||
<ActivityIndicator Grid.RowSpan="3" BackgroundColor="#50000000" Color="White"
|
||||
Margin="0, 20, 20, 0"
|
||||
IsVisible="{Binding IsLoading}" IsRunning="{Binding IsLoading}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</Shell.FlyoutHeaderTemplate>
|
||||
|
@ -23,6 +23,8 @@ namespace Pixiview
|
||||
nameof(UserProfileName), typeof(string), typeof(AppShell), ResourceHelper.Guest);
|
||||
public static readonly BindableProperty UserProfileIdProperty = BindableProperty.Create(
|
||||
nameof(UserProfileId), typeof(string), typeof(AppShell));
|
||||
public static readonly BindableProperty IsLoadingProperty = BindableProperty.Create(
|
||||
nameof(IsLoading), typeof(bool), typeof(AppShell));
|
||||
|
||||
public ImageSource UserProfileImage
|
||||
{
|
||||
@ -39,6 +41,11 @@ namespace Pixiview
|
||||
get => (string)GetValue(UserProfileIdProperty);
|
||||
set => SetValue(UserProfileIdProperty, value);
|
||||
}
|
||||
public bool IsLoading
|
||||
{
|
||||
get => (bool)GetValue(IsLoadingProperty);
|
||||
set => SetValue(IsLoadingProperty, value);
|
||||
}
|
||||
|
||||
public event EventHandler<BarHeightEventArgs> NavigationBarHeightChanged;
|
||||
public event EventHandler<BarHeightEventArgs> StatusBarHeightChanged;
|
||||
@ -76,12 +83,24 @@ namespace Pixiview
|
||||
{
|
||||
if (UserProfileId != null)
|
||||
{
|
||||
return;
|
||||
if (IsLoading)
|
||||
{
|
||||
return;
|
||||
}
|
||||
IsLoading = true;
|
||||
Task.Run(() =>
|
||||
{
|
||||
DoLoginInformation(true);
|
||||
IsLoading = false;
|
||||
});
|
||||
}
|
||||
PushToLogin(()=>
|
||||
else
|
||||
{
|
||||
Task.Run(() => DoLoginInformation(true));
|
||||
});
|
||||
PushToLogin(() =>
|
||||
{
|
||||
Task.Run(() => DoLoginInformation(true));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private bool isLoginOpened;
|
||||
|
Loading…
x
Reference in New Issue
Block a user