change: scroll back to top when refreshing
This commit is contained in:
		@@ -14,7 +14,7 @@
 | 
			
		||||
                     IconImageSource="{DynamicResource FontIconShare}"/>
 | 
			
		||||
    </ContentPage.ToolbarItems>
 | 
			
		||||
    <Grid>
 | 
			
		||||
        <ScrollView HorizontalOptions="Fill" HorizontalScrollBarVisibility="Never">
 | 
			
		||||
        <ScrollView x:Name="scrollView" HorizontalOptions="Fill" HorizontalScrollBarVisibility="Never">
 | 
			
		||||
            <StackLayout>
 | 
			
		||||
                <ActivityIndicator x:Name="activityLoading" Margin="0, 16, 0, 0"
 | 
			
		||||
                                   HeightRequest="40"
 | 
			
		||||
 
 | 
			
		||||
@@ -74,8 +74,13 @@ namespace Pixiview.Illust
 | 
			
		||||
            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;
 | 
			
		||||
            lastUpdated = default;
 | 
			
		||||
            StartLoad(true);
 | 
			
		||||
 
 | 
			
		||||
@@ -12,8 +12,8 @@
 | 
			
		||||
                     IconImageSource="{DynamicResource FontIconRefresh}"/>
 | 
			
		||||
    </ContentPage.ToolbarItems>
 | 
			
		||||
    <Grid>
 | 
			
		||||
        <ScrollView HorizontalOptions="Fill" HorizontalScrollBarVisibility="Never"
 | 
			
		||||
                    Scrolled="ScrollView_Scrolled">
 | 
			
		||||
        <ScrollView x:Name="scrollView" Scrolled="ScrollView_Scrolled"
 | 
			
		||||
                    HorizontalOptions="Fill" HorizontalScrollBarVisibility="Never">
 | 
			
		||||
            <StackLayout>
 | 
			
		||||
                <ActivityIndicator x:Name="activityLoading" Margin="0, 66, 0, 0"
 | 
			
		||||
                                   HeightRequest="40"
 | 
			
		||||
 
 | 
			
		||||
@@ -53,12 +53,13 @@ namespace Pixiview.Illust
 | 
			
		||||
            return Stores.LoadIllustData(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);
 | 
			
		||||
            StartLoad(true);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -12,7 +12,7 @@
 | 
			
		||||
                     IconImageSource="{DynamicResource FontIconRefresh}"/>
 | 
			
		||||
    </ContentPage.ToolbarItems>
 | 
			
		||||
    <Grid>
 | 
			
		||||
        <ScrollView HorizontalOptions="Fill" HorizontalScrollBarVisibility="Never">
 | 
			
		||||
        <ScrollView x:Name="scrollView" HorizontalOptions="Fill" HorizontalScrollBarVisibility="Never">
 | 
			
		||||
            <StackLayout>
 | 
			
		||||
                <ActivityIndicator x:Name="activityLoading" Margin="0, 16, 0, 0"
 | 
			
		||||
                                   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)
 | 
			
		||||
            {
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
            await scrollView.ScrollToAsync(0, -topOffset, true);
 | 
			
		||||
            StartLoad(true);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user