fix: align NextClass display with effective schedule data#74
Closed
yusancky wants to merge 2 commits into
Closed
Conversation
Agent-Logs-Url: https://github.com/yusancky/SystemTools/sessions/59f80547-a985-4df0-805a-e257719290d4 Co-authored-by: yusancky <83524927+yusancky@users.noreply.github.com>
Agent-Logs-Url: https://github.com/yusancky/SystemTools/sessions/59f80547-a985-4df0-805a-e257719290d4 Co-authored-by: yusancky <83524927+yusancky@users.noreply.github.com>
Owner
|
嗯诶 |
Owner
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Owner
|
目前长时间上学面临高考,可能需要一段时间审查完成代码。敬请谅解。 |
Author
试了一下,在我的测试情况下,工作都符合预期。 这样的话,这个 PR 只能说是用一些预计算值对逻辑做了轻微简化,实际收益有限。为节省时间避免意外引入问题,我决定关闭它。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
NextClassDisplayComponent原先直接读取原始课程配置数据,在「档案设置」中禁用时间线上的下一节课程后,仍会显示这些未启用的课程作为“下一节课”,导致组件显示与实际课程表安排不一致。解决策略
重构
Controls/Components/NextClassDisplayComponent.axaml.cs相关逻辑,改为直接依赖ILessonsService提供的已计算字段:NextClassSubjectNextClassTimeLayoutItem这些字段由
ILessonsService基于当前启用状态、有效课表和时间上下文计算得出,已经排除未启用课程,确保显示内容准确。同时,复用服务层课表计算逻辑,避免 UI 层重复实现筛选,提升了相关逻辑健壮性。验证
dotnet build -c Release -p:EnableWindowsTargeting=true通过,并已执行parallel_validation,确认 CodeQL 扫描无告警和完成 Code Review 反馈处理。NextClass组件会立即正确刷新。