change: scroll back to top when refreshing
This commit is contained in:
parent
2cdfe70429
commit
350ef14647
@ -14,7 +14,7 @@
|
|||||||
IconImageSource="{DynamicResource FontIconShare}"/>
|
IconImageSource="{DynamicResource FontIconShare}"/>
|
||||||
</ContentPage.ToolbarItems>
|
</ContentPage.ToolbarItems>
|
||||||
<Grid>
|
<Grid>
|
||||||
<ScrollView HorizontalOptions="Fill" HorizontalScrollBarVisibility="Never">
|
<ScrollView x:Name="scrollView" HorizontalOptions="Fill" HorizontalScrollBarVisibility="Never">
|
||||||
<StackLayout>
|
<StackLayout>
|
||||||
<ActivityIndicator x:Name="activityLoading" Margin="0, 16, 0, 0"
|
<ActivityIndicator x:Name="activityLoading" Margin="0, 16, 0, 0"
|
||||||
HeightRequest="40"
|
HeightRequest="40"
|
||||||
|
@ -74,8 +74,13 @@ namespace Pixiview.Illust
|
|||||||
StartLoad(force);
|
StartLoad(force);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Refresh_Clicked(object sender, EventArgs e)
|
private async void Refresh_Clicked(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
if (IsLoading)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await scrollView.ScrollToAsync(0, -topOffset, true);
|
||||||
flag = false;
|
flag = false;
|
||||||
lastUpdated = default;
|
lastUpdated = default;
|
||||||
StartLoad(true);
|
StartLoad(true);
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
IconImageSource="{DynamicResource FontIconRefresh}"/>
|
IconImageSource="{DynamicResource FontIconRefresh}"/>
|
||||||
</ContentPage.ToolbarItems>
|
</ContentPage.ToolbarItems>
|
||||||
<Grid>
|
<Grid>
|
||||||
<ScrollView HorizontalOptions="Fill" HorizontalScrollBarVisibility="Never"
|
<ScrollView x:Name="scrollView" Scrolled="ScrollView_Scrolled"
|
||||||
Scrolled="ScrollView_Scrolled">
|
HorizontalOptions="Fill" HorizontalScrollBarVisibility="Never">
|
||||||
<StackLayout>
|
<StackLayout>
|
||||||
<ActivityIndicator x:Name="activityLoading" Margin="0, 66, 0, 0"
|
<ActivityIndicator x:Name="activityLoading" Margin="0, 66, 0, 0"
|
||||||
HeightRequest="40"
|
HeightRequest="40"
|
||||||
|
@ -53,12 +53,13 @@ namespace Pixiview.Illust
|
|||||||
return Stores.LoadIllustData(force);
|
return Stores.LoadIllustData(force);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Refresh_Clicked(object sender, EventArgs e)
|
private async void Refresh_Clicked(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (IsLoading)
|
if (IsLoading)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
await scrollView.ScrollToAsync(0, -topOffset, true);
|
||||||
StartLoad(true);
|
StartLoad(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
IconImageSource="{DynamicResource FontIconRefresh}"/>
|
IconImageSource="{DynamicResource FontIconRefresh}"/>
|
||||||
</ContentPage.ToolbarItems>
|
</ContentPage.ToolbarItems>
|
||||||
<Grid>
|
<Grid>
|
||||||
<ScrollView HorizontalOptions="Fill" HorizontalScrollBarVisibility="Never">
|
<ScrollView x:Name="scrollView" HorizontalOptions="Fill" HorizontalScrollBarVisibility="Never">
|
||||||
<StackLayout>
|
<StackLayout>
|
||||||
<ActivityIndicator x:Name="activityLoading" Margin="0, 16, 0, 0"
|
<ActivityIndicator x:Name="activityLoading" Margin="0, 16, 0, 0"
|
||||||
HeightRequest="40"
|
HeightRequest="40"
|
||||||
|
@ -337,12 +337,13 @@ namespace Pixiview.Illust
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Refresh_Clicked(object sender, EventArgs e)
|
private async void Refresh_Clicked(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (IsLoading)
|
if (IsLoading)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
await scrollView.ScrollToAsync(0, -topOffset, true);
|
||||||
StartLoad(true);
|
StartLoad(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user