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