浏览代码

Resets explain commit when switching commits

main
Keith Daulton 1年前
父节点
当前提交
c6b39e8f56
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. +10
    -0
      src/webviews/apps/commitDetails/commitDetails.ts

+ 10
- 0
src/webviews/apps/commitDetails/commitDetails.ts 查看文件

@ -300,6 +300,16 @@ export class CommitDetailsApp extends App> {
// if (this.state.includeRichContent) {
this.renderPullRequestAndAutolinks(this.state);
// }
this.resetExplainCommit();
}
resetExplainCommit() {
const $explainPanel = document.querySelector('[data-region="explain-pane"]')!;
$explainPanel.removeAttribute('expanded');
$explainPanel.querySelector('button')!.removeAttribute('aria-busy');
const $explanation = $explainPanel.querySelector('[data-region="commit-explanation"]')!;
$explanation.classList.remove('has-error');
$explanation.innerHTML = '';
}
renderBanner(state: CommitState, target?: HTMLElement) {

正在加载...
取消
保存