Skip to content

Commit

Permalink
✨ 账号切换数据改为启动时加载避免等待
Browse files Browse the repository at this point in the history
  • Loading branch information
rmbadmin committed Nov 16, 2023
1 parent 3d59c24 commit fd119ae
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions src/BD.WTTS.Client.Plugins.GameAccount/Plugins/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,10 @@ public override void OnAddAutoMapper(IMapperConfigurationExpression cfg)
{
yield return GetConfiguration<GameAccountSettings_>(directoryExists);
}

public override ValueTask OnInitializeAsync()
{
IViewModelManager.Instance.Get<GameAccountPageViewModel>();
return default;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ public partial class GameAccountPage : PageBase<GameAccountPageViewModel>
public GameAccountPage()
{
InitializeComponent();
DataContext ??= new GameAccountPageViewModel();
this.SetViewModel<GameAccountPageViewModel>(true);
//DataContext ??= new GameAccountPageViewModel();

//this.WhenActivated(disposable =>
//{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@
<spp:AppItem
Title="{Binding DisplayName}"
Width="280"
MaxHeight="150">
MaxHeight="150"
Description="{Binding AppId}">
<spp:AppItem.Status>
<Border Classes="Status">
<Panel>
Expand Down
2 changes: 1 addition & 1 deletion src/BD.WTTS.Client/Plugins/Abstractions/IPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void ConfigureRequiredServices(
ValueTask OnPeerConnected(bool isReconnected);

/// <summary>
/// 带参数启动时执行
/// 解析程序带参数启动时执行指令
/// </summary>
/// <returns></returns>
ValueTask OnCommandRun(params string[] commandParams);
Expand Down

0 comments on commit fd119ae

Please sign in to comment.