Skip to content

Commit cd98666

Browse files
authored
Merge pull request #47 from hansu/46-commit-summary-always-hides-when-switching-focus
46 Fix commit summary always hides when switching focus
2 parents cf9df0b + 4160097 commit cd98666

File tree

5 files changed

+3
-10
lines changed

5 files changed

+3
-10
lines changed

package.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,6 @@
138138
"default": "Inline",
139139
"description": "Specifies where the Commit Details View is rendered in the Git Graph View."
140140
},
141-
"git-graph.commitDetailsView.initiallyHideSummary": {
142-
"type": "boolean",
143-
"default": false,
144-
"description": "Initially hide the commit summary in the Commit Details View."
145-
},
146141
"git-graph.contextMenuActionsVisibility": {
147142
"type": "object",
148143
"default": {},

src/config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ class Config {
7272
: FileViewType.Tree,
7373
location: this.getRenamedExtensionSetting<string>('commitDetailsView.location', 'commitDetailsViewLocation', 'Inline') === 'Docked to Bottom'
7474
? CommitDetailsViewLocation.DockedToBottom
75-
: CommitDetailsViewLocation.Inline,
76-
initiallyHideSummary: this.config.get('commitDetailsView.initiallyHideSummary', false)
75+
: CommitDetailsViewLocation.Inline
7776
};
7877
}
7978

src/extensionState.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const DEFAULT_REPO_STATE: GitRepoState = {
3838
showStashes: BooleanOverride.Default,
3939
showTags: BooleanOverride.Default,
4040
workspaceFolderIndex: null,
41-
isCdvSummaryHidden: true
41+
isCdvSummaryHidden: false
4242
};
4343

4444
const DEFAULT_GIT_GRAPH_VIEW_GLOBAL_STATE: GitGraphViewGlobalState = {

src/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,6 @@ export interface CommitDetailsViewConfig {
288288
readonly fileTreeCompactFolders: boolean;
289289
readonly fileViewType: FileViewType;
290290
readonly location: CommitDetailsViewLocation;
291-
readonly initiallyHideSummary: boolean;
292291
}
293292

294293
export interface GraphConfig {

web/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ class GitGraphView {
184184
name: this.gitRepos[this.currentRepo].name || getRepoName(this.currentRepo)
185185
}, 'Opening Terminal');
186186
});
187-
this.gitRepos[this.currentRepo].isCdvSummaryHidden = this.config.commitDetailsView.initiallyHideSummary;
188187
}
189188

190189

@@ -2735,6 +2734,7 @@ class GitGraphView {
27352734
let cdvSummaryToggleBtn = document.getElementById('cdvSummaryToggleBtn');
27362735
if (cdvSummaryToggleBtn !== null) cdvSummaryToggleBtn.addEventListener('click', () => {
27372736
this.gitRepos[this.currentRepo].isCdvSummaryHidden = !(this.gitRepos[this.currentRepo].isCdvSummaryHidden);
2737+
this.saveRepoState();
27382738
this.hideCdvSummary(this.gitRepos[this.currentRepo].isCdvSummaryHidden);
27392739
});
27402740
this.hideCdvSummary(this.gitRepos[this.currentRepo].isCdvSummaryHidden);

0 commit comments

Comments
 (0)