chore: 在遮罩期间保持播放提醒音#1704
Merged
Merged
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
HelloWRC
requested changes
Mar 15, 2026
HelloWRC
left a comment
Member
There was a problem hiding this comment.
事实上,这种实现方法可能不能实现跨提醒会话保持播放提醒音效。这里实际上是在控制提醒语音,而非提醒音效。
提醒音效是在 https://github.com/ClassIsland/ClassIsland/blob/master/ClassIsland/Services/NotificationWorkerService.cs#L187 进行播放的,并会在当前提醒会话结束时(如遮罩播放完毕或被打断)被取消播放。如果要实现这个功能,应该考虑将这个用于取消的 CancellationToken 保存到提醒请求中,并在整个提醒播放完毕或被打断时取消。
Contributor
Author
|
在 NotificationRequest.cs 里新增了 NotificationSoundCancellationTokenSource 让每个提醒请求都能保存自己那次提醒音效的取消控制 我应该没理解错吧) |
Contributor
|
应该还有一个问题,就是如果应该显示通知,播放音频的时候,没有可显示的组件(比如方案里什么组件都没加),这些音频似乎都会在组件可用之后(添加了一个组件/切换有组件的方案)之后一次性突然全部蹦出来, |
HelloWRC
requested changes
Mar 29, 2026
6a5c8c2 to
d97224d
Compare
Contributor
Author
|
目前已经使用集控提醒完成测试 |
HelloWRC
approved these changes
Mar 29, 2026
Member
C14147
pushed a commit
to sophia-schola/ClassIsland-NEXT
that referenced
this pull request
Mar 29, 2026
Koharu-Mizuki
pushed a commit
to Koharu-Mizuki/ClassIsland-RB
that referenced
this pull request
May 24, 2026
Koharu-Mizuki
pushed a commit
to Koharu-Mizuki/ClassIsland-RB
that referenced
this pull request
Jun 19, 2026
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.

这个 Pull Request 做了什么?
在遮罩期间保持播放提醒音
破坏性变更
若 cancellationToken.IsCancellationRequested 为假无法清空播放队列(?)
相关 Issue
fix #1673
fix #1689
检查清单