feature: chose to login
This commit is contained in:
		@@ -525,25 +525,32 @@ namespace Pixiview.Illust
 | 
			
		||||
            illustData = DoLoadIllustData(force);
 | 
			
		||||
            if (illustData == null)
 | 
			
		||||
            {
 | 
			
		||||
                if (isTrying)
 | 
			
		||||
                MainThread.BeginInvokeOnMainThread(async () =>
 | 
			
		||||
                {
 | 
			
		||||
                    MainThread.BeginInvokeOnMainThread(() =>
 | 
			
		||||
                    if (isTrying)
 | 
			
		||||
                    {
 | 
			
		||||
                        DisplayAlert(ResourceHelper.Title,
 | 
			
		||||
                        _ = DisplayAlert(ResourceHelper.Title,
 | 
			
		||||
                            ResourceHelper.FailedResponse + "\n" + lastError?.Substring(0, 40),
 | 
			
		||||
                            ResourceHelper.Ok);
 | 
			
		||||
                    });
 | 
			
		||||
                    isTrying = false;
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    isTrying = true;
 | 
			
		||||
                    AppShell.Current.PushToLogin(() =>
 | 
			
		||||
                        isTrying = false;
 | 
			
		||||
                    }
 | 
			
		||||
                    else
 | 
			
		||||
                    {
 | 
			
		||||
                        Task.Run(() => AppShell.Current.DoLoginInformation(true));
 | 
			
		||||
                        StartLoad(true);
 | 
			
		||||
                    });
 | 
			
		||||
                }
 | 
			
		||||
                        //isTrying = true;
 | 
			
		||||
                        var result = await DisplayAlert(
 | 
			
		||||
                            ResourceHelper.Title,
 | 
			
		||||
                            ResourceHelper.ConfirmLogin,
 | 
			
		||||
                            ResourceHelper.Yes, ResourceHelper.No);
 | 
			
		||||
                        if (result)
 | 
			
		||||
                        {
 | 
			
		||||
                            AppShell.Current.PushToLogin(() =>
 | 
			
		||||
                            {
 | 
			
		||||
                                Task.Run(() => AppShell.Current.DoLoginInformation(true));
 | 
			
		||||
                                StartLoad(true);
 | 
			
		||||
                            });
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                });
 | 
			
		||||
                //App.DebugError("illusts.load", "failed to load illusts data.");
 | 
			
		||||
                IsLoading = false;
 | 
			
		||||
                IsBottomLoading = false;
 | 
			
		||||
 
 | 
			
		||||
@@ -58,4 +58,5 @@
 | 
			
		||||
    <ExportSuccess>视频已导出到照片库。</ExportSuccess>
 | 
			
		||||
    <FailedResponse>无法获取返回结果。</FailedResponse>
 | 
			
		||||
    <ConfirmSyncFavorite>要同步收藏吗?</ConfirmSyncFavorite>
 | 
			
		||||
    <ConfirmLogin>当前身份为游客,是否跳转到登录页面?</ConfirmLogin>
 | 
			
		||||
</root>
 | 
			
		||||
@@ -38,6 +38,7 @@ namespace Pixiview.Resources
 | 
			
		||||
        public static string ExportSuccess => GetResource(nameof(ExportSuccess));
 | 
			
		||||
        public static string FailedResponse => GetResource(nameof(FailedResponse));
 | 
			
		||||
        public static string ConfirmSyncFavorite => GetResource(nameof(ConfirmSyncFavorite));
 | 
			
		||||
        public static string ConfirmLogin => GetResource(nameof(ConfirmLogin));
 | 
			
		||||
 | 
			
		||||
        static readonly Dictionary<string, LanguageResource> dict = new Dictionary<string, LanguageResource>();
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user