Skip to content

feat(mymsgbox): 实现部分控件的 MVVM 设计#3201

Draft
RyogiMutsuki wants to merge 2 commits into
devfrom
refactor/mymsgbox
Draft

feat(mymsgbox): 实现部分控件的 MVVM 设计#3201
RyogiMutsuki wants to merge 2 commits into
devfrom
refactor/mymsgbox

Conversation

@RyogiMutsuki

@RyogiMutsuki RyogiMutsuki commented Jun 19, 2026

Copy link
Copy Markdown
Member

将部分控件转换为 MVVM 设计模式,以便实现控件解耦合

Work In Progress

Summary by Sourcery

为消息框控件引入 MVVM 风格的基础设施,并开始将其集成到现有的消息系统中。

新功能:

  • 添加 MyMsgTextDataButtonContext 模型以及 MyMsgBoxCommand,以解耦的、基于命令的方式描述消息内容和按钮行为。
  • 添加 MyMsgTextViewModelViewModelBase,以支持消息框文本对话框的 MVVM 绑定,包括按钮可见性和标签。
  • 添加可枚举扩展 ForEachIndexed,以简化在整个代码库中需要索引的迭代逻辑。

增强内容:

  • 新增一个接受基于 MVVM 的 MyMsgTextDataMyMsgText 构造函数,并将其绑定到新的视图模型。
  • ModMain 中为待处理的 MyMsgTextData 实例添加存储和显示逻辑,与现有基于 MyMsgBoxConverter 的队列机制并行工作。
  • 优化 MyMsgBoxTick 逻辑,改用显式的 Count 检查来处理待显示的消息框。
Original summary in English

Summary by Sourcery

Introduce MVVM-style infrastructure for message box controls and begin integrating it into the existing message system.

New Features:

  • Add MyMsgTextData and ButtonContext models plus MyMsgBoxCommand to describe message content and button behavior in a decoupled, command-based way.
  • Add MyMsgTextViewModel and ViewModelBase to support MVVM binding for message box text dialogs, including button visibility and labels.
  • Add enumerable extension ForEachIndexed to simplify index-aware iteration across the codebase.

Enhancements:

  • Add a new MyMsgText constructor that accepts MVVM-based MyMsgTextData and bind it to the new view model.
  • Add storage and display logic for pending MyMsgTextData instances in ModMain, alongside existing MyMsgBoxConverter-based queueing.
  • Refine MyMsgBoxTick logic to use explicit Count checks for pending message boxes.

@pcl-ce-automation pcl-ce-automation Bot added 🛠️ 等待审查 Pull Request 已完善,等待维护者或负责人进行代码审查 size: L PR 大小评估:大型 labels Jun 19, 2026
@RyogiMutsuki RyogiMutsuki marked this pull request as draft June 19, 2026 17:54
@pcl-ce-automation pcl-ce-automation Bot added 🚧 正在处理 开发人员正在对该内容进行开发、测试或修复,进展中 and removed 🛠️ 等待审查 Pull Request 已完善,等待维护者或负责人进行代码审查 labels Jun 19, 2026
@sourcery-ai

sourcery-ai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

通过添加用于 MyMsg 的数据模型、命令和视图模型,并将其部分接入现有基础设施,同时增加用于基于命令的按钮处理和带索引枚举的辅助工具,引入一个 MVVM 风格的消息框系统。

MVVM MyMsg 消息框创建与按钮点击时序图

sequenceDiagram
    actor User
    participant ModMain
    participant WaitMyMsgData
    participant MyMsgText
    participant MyMsgTextViewModel
    participant MyMsgTextData
    participant MyMsgBoxCommand
    participant ButtonContext

    User->>ModMain: MyMsgBox(MyMsgTextData data)
    ModMain->>WaitMyMsgData: add(data)
    ModMain->>ModMain: MyMsgBoxShow()
    ModMain->>MyMsgText: new MyMsgText(WaitMyMsgData[0])
    MyMsgText->>MyMsgTextData: subscribe Exited += Close
    MyMsgText->>MyMsgTextViewModel: new MyMsgTextViewModel(data)
    MyMsgTextViewModel->>MyMsgTextData: read Title, Message, Command

    Note over MyMsgTextData,MyMsgBoxCommand: MyMsgTextData(message, buttons) creates MyMsgBoxCommand
    MyMsgTextData->>MyMsgBoxCommand: new MyMsgBoxCommand(buttons)

    User->>MyMsgBoxCommand: Execute(buttonId)
    MyMsgBoxCommand->>MyMsgBoxCommand: Clicked(buttonId)
    MyMsgBoxCommand->>ButtonContext: Operation.Invoke(buttonId)
    alt ExitWhenClick is true
        MyMsgBoxCommand->>MyMsgBoxCommand: Exited()
        MyMsgBoxCommand->>MyMsgTextData: set Result
        MyMsgTextData->>MyMsgTextData: Exited()
        MyMsgTextData->>MyMsgText: Close()
    end
Loading

File-Level Changes

Change Details Files
为 MyMsg 文本对话框添加 MVVM 数据和命令层,并将其挂接到 UI 控件中。
  • 引入 MyMsgTextData 模型,用于封装消息文本、标题、命令、结果和退出生命周期事件,并提供便捷构造函数来自动连接一个 MyMsgBoxCommand 实例。
  • 实现 MyMsgBoxCommand 作为一个 ICommand,将按钮索引映射到 ButtonContext 实例,暴露 CanExecute/Execute 逻辑,并触发 Clicked/Exited 回调。
  • 添加 ButtonContext 模型,用于描述每个按钮的标签、退出行为以及操作委托。
  • 将 MyMsgText 控件改造为接受 MyMsgTextData,订阅其 Exited 事件,将 MyMsgTextViewModel 作为 DataContext,并在加载时初始化外观。
Plain Craft Launcher 2/Controls/MyMsg/Models/MyMsgTextData.cs
Plain Craft Launcher 2/Controls/MyMsg/Commands/MyMsgBoxCommand.cs
Plain Craft Launcher 2/Controls/MyMsg/Models/ButtonContext.cs
Plain Craft Launcher 2/Controls/MyMsg/MyMsgText.xaml.cs
引入 MyMsgTextViewModel 和一个简单的 ViewModelBase,以支持 MyMsgText 的 MVVM 绑定。
  • 创建实现 INotifyPropertyChanged 的 ViewModelBase,并提供 SetProperty 辅助方法用于属性变更通知。
  • 添加 MyMsgTextViewModel,暴露 Title、Message、按钮可见性和标签,以及一个 ICommand Context,并在构造函数中基于 MyMsgTextData/MyMsgBoxCommand 初始化这些属性。
  • 通过对不同按钮索引调用 ICommand.CanExecute 来计算按钮可见性,并强制保证至少有一个按钮可用。
Plain Craft Launcher 2/Controls/MyMsg/ViewModels/ViewModelBase.cs
Plain Craft Launcher 2/Controls/MyMsg/ViewModels/MyMsgTextViewModel.cs
扩展 ModMain 消息框基础设施,使其能够与新的数据模型协同工作,并暴露队列式显示辅助方法。
  • 在 ModMain 中添加对新 MyMsg 模型命名空间的 using 引用。
  • 引入 WaitMyMsgData 队列,用于与现有的 WaitingMyMsgBox 队列一起保存待处理的 MyMsgTextData 实例。
  • 添加重载方法 MyMsgBox(MyMsgTextData data) 作为从新数据模型创建对话框的存根接口(实现待定)。
  • 添加 MyMsgBoxShow 辅助方法,通过向主面板添加 MyMsgText 控件来显示排队的 MyMsgTextData 项,并管理背景可见性。
  • 将 MyMsgBoxTick 中对 WaitingMyMsgBox 的检查,从 LINQ Any 改为使用 Count,以提高一致性/性能。
  • 对 MyMsgBoxMarkdown 方法签名和 TimerMain 区域进行轻微格式整理。
Plain Craft Launcher 2/Modules/ModMain.cs
添加在新的 MVVM 消息框流程中使用的工具类和占位类型。
  • 添加 EnumerableExtensions.ForEachIndexed 扩展方法,用于对集合进行带索引迭代并执行操作,在 MyMsgBoxCommand 中用于填充其操作映射。
  • 引入 MyMsgInputData 模型,用于未来 MVVM 化的输入对话框,包含简洁的 UserInput 和 Description 属性。
  • 添加存根类 MyMsgInputCommand,作为输入对话框 MVVM 命令行为的占位实现。
  • 在 MyMsgInput.xaml.cs 中包含新的 MyMsg 模型命名空间,为后续 MVVM 集成做准备,并进行少量空白字符清理。
  • 在需要的地方添加对组件模型和新命名空间的 using 引用。
PCL.Core/Utils/Exts/EnumerableExtensions.cs
Plain Craft Launcher 2/Controls/MyMsg/Models/MyMsgInputData.cs
Plain Craft Launcher 2/Controls/MyMsg/Commands/MyMsgInputCommand.cs
Plain Craft Launcher 2/Controls/MyMsg/MyMsgInput.xaml.cs
Plain Craft Launcher 2/Controls/MyMsg/MyMsgText.xaml.cs

Tips and commands

Interacting with Sourcery

  • 触发新的代码审查: 在 pull request 中评论 @sourcery-ai review
  • 继续讨论: 直接回复 Sourcery 的审查评论。
  • 从审查评论生成 GitHub issue: 在审查评论下回复,要求 Sourcery 从该评论创建一个 issue。你也可以直接回复 @sourcery-ai issue 来从该评论创建 issue。
  • 生成 pull request 标题: 在 pull request 标题的任意位置写上 @sourcery-ai,即可随时生成一个标题。你也可以在 pull request 中评论 @sourcery-ai title 以(重新)生成标题。
  • 生成 pull request 摘要: 在 pull request 正文中任意位置写上 @sourcery-ai summary,即可在对应位置生成 PR 摘要。你也可以在 pull request 中评论 @sourcery-ai summary 来在任意时间(重新)生成摘要。
  • 生成审查者指南: 在 pull request 中评论 @sourcery-ai guide,可在任意时间(重新)生成审查者指南。
  • 解决所有 Sourcery 评论: 在 pull request 中评论 @sourcery-ai resolve,以一次性解决所有 Sourcery 评论。如果你已经处理完所有评论且不想再看到它们,这会很有用。
  • 撤销所有 Sourcery 审查: 在 pull request 中评论 @sourcery-ai dismiss,以撤销所有现有的 Sourcery 审查。特别适用于你想从头开始一次新的审查——记得随后评论 @sourcery-ai review 来触发新的审查!

Customizing Your Experience

访问你的 dashboard 以:

  • 启用或禁用审查功能,例如 Sourcery 生成的 pull request 摘要、审查者指南等。
  • 修改审查所使用的语言。
  • 添加、移除或编辑自定义审查指令。
  • 调整其他审查设置。

Getting Help

Original review guide in English

Reviewer's Guide

Introduces an MVVM-style message box system by adding data models, commands, and view models for MyMsg, partially wiring them into existing infrastructure and adding helper utilities for command-based button handling and indexed enumeration.

Sequence diagram for MVVM MyMsg box creation and button click

sequenceDiagram
    actor User
    participant ModMain
    participant WaitMyMsgData
    participant MyMsgText
    participant MyMsgTextViewModel
    participant MyMsgTextData
    participant MyMsgBoxCommand
    participant ButtonContext

    User->>ModMain: MyMsgBox(MyMsgTextData data)
    ModMain->>WaitMyMsgData: add(data)
    ModMain->>ModMain: MyMsgBoxShow()
    ModMain->>MyMsgText: new MyMsgText(WaitMyMsgData[0])
    MyMsgText->>MyMsgTextData: subscribe Exited += Close
    MyMsgText->>MyMsgTextViewModel: new MyMsgTextViewModel(data)
    MyMsgTextViewModel->>MyMsgTextData: read Title, Message, Command

    Note over MyMsgTextData,MyMsgBoxCommand: MyMsgTextData(message, buttons) creates MyMsgBoxCommand
    MyMsgTextData->>MyMsgBoxCommand: new MyMsgBoxCommand(buttons)

    User->>MyMsgBoxCommand: Execute(buttonId)
    MyMsgBoxCommand->>MyMsgBoxCommand: Clicked(buttonId)
    MyMsgBoxCommand->>ButtonContext: Operation.Invoke(buttonId)
    alt ExitWhenClick is true
        MyMsgBoxCommand->>MyMsgBoxCommand: Exited()
        MyMsgBoxCommand->>MyMsgTextData: set Result
        MyMsgTextData->>MyMsgTextData: Exited()
        MyMsgTextData->>MyMsgText: Close()
    end
Loading

File-Level Changes

Change Details Files
Add MVVM data and command layer for MyMsg text dialogs and hook it into the UI control.
  • Introduce MyMsgTextData model to encapsulate message text, title, command, result, and exit lifecycle events with convenient constructors that wire up a MyMsgBoxCommand instance.
  • Implement MyMsgBoxCommand as an ICommand that maps button indices to ButtonContext instances, exposes CanExecute/Execute logic, and raises Clicked/Exited callbacks.
  • Add ButtonContext model to describe per-button label, exit behavior, and operation delegate.
  • Wire MyMsgText control to accept MyMsgTextData, subscribe to its Exited event, set a MyMsgTextViewModel as DataContext, and initialize appearance on load.
Plain Craft Launcher 2/Controls/MyMsg/Models/MyMsgTextData.cs
Plain Craft Launcher 2/Controls/MyMsg/Commands/MyMsgBoxCommand.cs
Plain Craft Launcher 2/Controls/MyMsg/Models/ButtonContext.cs
Plain Craft Launcher 2/Controls/MyMsg/MyMsgText.xaml.cs
Introduce MyMsgTextViewModel and a simple ViewModelBase to support MVVM binding for MyMsgText.
  • Create ViewModelBase implementing INotifyPropertyChanged with a SetProperty helper for property change notification.
  • Add MyMsgTextViewModel exposing Title, Message, button visibility and labels, plus an ICommand Context, and initialize these from MyMsgTextData/MyMsgBoxCommand in the constructor.
  • Compute button visibility via ICommand.CanExecute for button indices and enforce that at least one button is available.
Plain Craft Launcher 2/Controls/MyMsg/ViewModels/ViewModelBase.cs
Plain Craft Launcher 2/Controls/MyMsg/ViewModels/MyMsgTextViewModel.cs
Extend ModMain message box infrastructure to work with the new data model and expose a queued display helper.
  • Add using for the new MyMsg models namespace in ModMain.
  • Introduce WaitMyMsgData queue to hold pending MyMsgTextData instances alongside the existing WaitingMyMsgBox queue.
  • Add a stub overload MyMsgBox(MyMsgTextData data) for creating dialogs from the new model (implementation TBD).
  • Add MyMsgBoxShow helper that displays queued MyMsgTextData items by adding MyMsgText controls to the main panel and manages background visibility.
  • Adjust MyMsgBoxTick to use Count checks on WaitingMyMsgBox instead of LINQ Any for consistency/performance.
  • Minor formatting changes to MyMsgBoxMarkdown signature and TimerMain region.
Plain Craft Launcher 2/Modules/ModMain.cs
Add utility and placeholder types used by the new MVVM message box flow.
  • Add EnumerableExtensions.ForEachIndexed extension to iterate collections with index and apply an action, used by MyMsgBoxCommand to populate its operation map.
  • Introduce MyMsgInputData model for future MVVM-ified input dialogs with simple UserInput and Description properties.
  • Add stub MyMsgInputCommand class as a placeholder for MVVM command behavior for input dialogs.
  • Include new MyMsg models namespace in MyMsgInput.xaml.cs to prepare for MVVM integration and minor whitespace cleanup.
  • Add using directives for component model and new namespaces where needed.
PCL.Core/Utils/Exts/EnumerableExtensions.cs
Plain Craft Launcher 2/Controls/MyMsg/Models/MyMsgInputData.cs
Plain Craft Launcher 2/Controls/MyMsg/Commands/MyMsgInputCommand.cs
Plain Craft Launcher 2/Controls/MyMsg/MyMsgInput.xaml.cs
Plain Craft Launcher 2/Controls/MyMsg/MyMsgText.xaml.cs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - 我在这里给出了一些整体性的反馈:

  • ModMain 中新的 MyMsgBox(MyMsgTextData data) 重载目前是空实现;请实现预期行为(将基于 MVVM 的消息框入队/显示),或者显式抛出 NotImplementedException,以避免静默无效果的调用。
  • MyMsgTextViewModel 的属性在 setter 中使用了 field,但没有对应的后备字段,而且使用了无效的 C# 语法(get; set { ... }),因此该类按当前写法将无法编译;请重构每个属性,使用显式的后备字段并正确调用 SetProperty
  • MyMsgBoxShow 同时混用了 WaitingMyMsgBoxWaitMyMsgData(检查的是 WaitingMyMsgBox.Count,却从 WaitMyMsgData 中出队),这会导致队列不同步,并可能引发索引错误或漏掉消息;请将条件判断和出队来源统一到同一个一致的集合上。
给 AI 代理的提示
请解决本次代码审查中的各条评论:

## 总体评论
- `ModMain` 中新的 `MyMsgBox(MyMsgTextData data)` 重载目前是空实现;请实现预期行为(将基于 MVVM 的消息框入队/显示),或者显式抛出 `NotImplementedException`,以避免静默无效果的调用。
- `MyMsgTextViewModel` 的属性在 setter 中使用了 `field`,但没有对应的后备字段,而且使用了无效的 C# 语法(`get; set { ... }`),因此该类按当前写法将无法编译;请重构每个属性,使用显式的后备字段并正确调用 `SetProperty`- `MyMsgBoxShow` 同时混用了 `WaitingMyMsgBox``WaitMyMsgData`(检查的是 `WaitingMyMsgBox.Count`,却从 `WaitMyMsgData` 中出队),这会导致队列不同步,并可能引发索引错误或漏掉消息;请将条件判断和出队来源统一到同一个一致的集合上。

Sourcery 对开源项目是免费的——如果你觉得我们的评审有帮助,欢迎分享 ✨
帮我变得更有用!请在每条评论上点击 👍 或 👎,我会根据你的反馈改进后续的评审。
Original comment in English

Hey - I've left some high level feedback:

  • The new MyMsgBox(MyMsgTextData data) overload in ModMain is currently empty; either implement the intended behavior (enqueue/show the MVVM-based message box) or explicitly throw NotImplementedException to avoid silent no-ops.
  • The MyMsgTextViewModel properties use field in the setter without backing fields and with invalid C# syntax (get; set { ... }), so this class as written will not compile; refactor each property to use explicit backing fields and call SetProperty correctly.
  • MyMsgBoxShow mixes WaitingMyMsgBox and WaitMyMsgData (checking WaitingMyMsgBox.Count but dequeuing from WaitMyMsgData), which can desynchronize the queues and cause index errors or skipped messages; align the conditions and dequeue source to a single consistent collection.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The new `MyMsgBox(MyMsgTextData data)` overload in `ModMain` is currently empty; either implement the intended behavior (enqueue/show the MVVM-based message box) or explicitly throw `NotImplementedException` to avoid silent no-ops.
- The `MyMsgTextViewModel` properties use `field` in the setter without backing fields and with invalid C# syntax (`get; set { ... }`), so this class as written will not compile; refactor each property to use explicit backing fields and call `SetProperty` correctly.
- `MyMsgBoxShow` mixes `WaitingMyMsgBox` and `WaitMyMsgData` (checking `WaitingMyMsgBox.Count` but dequeuing from `WaitMyMsgData`), which can desynchronize the queues and cause index errors or skipped messages; align the conditions and dequeue source to a single consistent collection.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3fdb4f5fcc

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +403 to +406
public static int MyMsgBox(MyMsgTextData data)
{

}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Implement the MyMsgTextData overload before merging

This new overload is declared to return int but falls off the end of the method. Since ModMain.cs is compiled into the WPF app, any build including this commit fails with CS0161 before the launcher can run; either implement the queue/wait logic and return the selected result or remove the overload until it is ready.

Useful? React with 👍 / 👎.

Comment on lines +107 to +109
Button1Text = cmd.GetButtonTextById(0);
Button2Text = cmd.GetButtonTextById(1);
Button3Text = cmd.GetButtonTextById(2);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Guard absent button labels before reading them

When callers use the default new MyMsgTextData("...") path, only buttons 0 and 1 exist, but this constructor still calls GetButtonTextById(2). That method dereferences the missing dictionary value, so the view model throws before the dialog can be shown for any dialog with fewer than three buttons; only read the label after the corresponding CanExecute check succeeds.

Useful? React with 👍 / 👎.

Comment on lines +21 to +24
DataContext = new MyMsgTextViewModel(data);
InitializeComponent();
ShapeLine.StrokeThickness = ModBase.GetWPFSize(1d);
Loaded += Load;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid using the legacy loader for data-backed dialogs

In the MyMsgTextData constructor path, myConverter is never assigned, but subscribing to the shared Load handler makes the loaded dialog execute Opacity = 0 and then dereference myConverter.IsWarn. The exception is caught after the opacity reset, so any data-backed dialog that does construct becomes invisible and never starts its show animation; use a loader that reads from the new data/view model or initialize the fields it depends on.

Useful? React with 👍 / 👎.

Comment on lines +593 to +598
else if (WaitingMyMsgBox.Count != 0)
{
// 没有弹窗,显示一个等待的弹窗
frmMain.PanMsgBackground.Visibility = Visibility.Visible;
frmMain.PanMsg.Children.Add(new MyMsgText(WaitMyMsgData[0]));
WaitMyMsgData.RemoveAt(0);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Check the data-dialog queue before indexing it

This branch tests WaitingMyMsgBox.Count but then indexes WaitMyMsgData[0]. In the new data-dialog flow, a pending MyMsgTextData with no legacy dialog will never be shown, while a legacy dialog with an empty data queue will throw and be swallowed every time this method runs; the condition should be based on WaitMyMsgData.Count.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: L PR 大小评估:大型 🚧 正在处理 开发人员正在对该内容进行开发、测试或修复,进展中

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant