Repository navigation
侧边栏:对话视频加载失败只记在 sidepanel-state 一处 - #433
Merged
Merged
Conversation
失败的错误码和文字存进 conv.failed,切对话时随对话清掉;sidepanel.js 去掉另存的 lastContextFailure,补救按钮画的时候按错误码算。
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.
改了什么
侧边栏打开历史对话、原视频读不到时,失败信息在
sidepanel.js里另存一份lastContextFailure,靠手动查run.alive判断还算不算,和sidepanel-state.js的conv.failed是同一件事的两份。conv.failed改成{ code, text }(静默读取时text为空),由CONTEXT_RESOLVED写,切对话时随对话清掉,view()带出。readOnlyReason和重画都从view().failed读;补救按钮(重试 / 打开视频)画的时候按code算。验证
node scripts/selftest.mjs:39 个通过。sidepanel-state.selftest.js加了:失败存进去、静默失败只留 code、切对话清掉、旧对话的失败忽略、读成功清掉。让切对话不清failed,测试失败。