From 796be050a5dc27aaac363f00bb6a71e79cc6dad9 Mon Sep 17 00:00:00 2001 From: croire <1432593898@qq.com> Date: Sat, 19 Mar 2022 20:34:47 +0800 Subject: [PATCH] =?UTF-8?q?UpdateUserInfo()=E6=B7=BB=E5=8A=A0=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E6=8D=95=E8=8E=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DownKyi/ViewModels/ViewIndexViewModel.cs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/DownKyi/ViewModels/ViewIndexViewModel.cs b/DownKyi/ViewModels/ViewIndexViewModel.cs index c5f99bd..66a230d 100644 --- a/DownKyi/ViewModels/ViewIndexViewModel.cs +++ b/DownKyi/ViewModels/ViewIndexViewModel.cs @@ -227,19 +227,19 @@ namespace DownKyi.ViewModels /// private async void UpdateUserInfo() { - LoginPanelVisibility = Visibility.Hidden; - - // 检查本地是否存在login文件,没有则说明未登录 - if (!File.Exists(StorageManager.GetLogin())) - { - LoginPanelVisibility = Visibility.Visible; - Header = new BitmapImage(new Uri("pack://application:,,,/Resources/default_header.jpg")); - UserName = null; - return; - } - try { + LoginPanelVisibility = Visibility.Hidden; + + // 检查本地是否存在login文件,没有则说明未登录 + if (!File.Exists(StorageManager.GetLogin())) + { + LoginPanelVisibility = Visibility.Visible; + Header = new BitmapImage(new Uri("pack://application:,,,/Resources/default_header.jpg")); + UserName = null; + return; + } + await Task.Run(new Action(() => { // 获取用户信息