Skip to content

Commit

Permalink
refactor: extract updateProjectSelection from projectIndex:
Browse files Browse the repository at this point in the history
  • Loading branch information
LinqLover committed May 2, 2024
1 parent 1023082 commit d41d90d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ actionProjectChangeDirectory
from: (FileDirectory on: gitRepository workingDir pathName).
directory ifNil: [^ self].
gitRepository workingDir: (FileSystem disk root resolve: directory pathName).
self projectSelection: self projectSelection. "updates repositoryExists, selectedHistorian, et al."
self updateProjectSelection.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,4 @@ ui
projectIndex: anIndex
anIndex > 1 ifFalse: [^ self].
projectIndex := anIndex.
repositoryExists := self projectSelection repository exists.
selectedHistorian := self projectSelection loadedHistorian.
self changed: #branchSelection.
commitSelection := nil.
commitToDiffAgainst := nil.
cachedCommitList := #().
repositoryExists ifFalse: [self informThatProjectDoesNotExist].
self refresh.
self updateProjectSelection.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ui
updateProjectSelection
repositoryExists := self projectSelection repository exists.
selectedHistorian := self projectSelection loadedHistorian.
self changed: #branchSelection.
commitSelection := nil.
commitToDiffAgainst := nil.
cachedCommitList := #().
repositoryExists ifFalse: [self informThatProjectDoesNotExist].
self refresh.
5 changes: 3 additions & 2 deletions src/Squit.package/SquitBrowser.class/methodProperties.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"actionPackageInfoObjectEditPreamble" : "jr 5/13/2017 21:16",
"actionPackageInfoObjectEditPreambleOfRemoval" : "jr 5/13/2017 21:16",
"actionProjectAdd" : "jr 5/11/2017 14:09",
"actionProjectChangeDirectory" : "ct 10/4/2022 20:16",
"actionProjectChangeDirectory" : "ct 5/2/2024 19:05",
"actionProjectClone" : "jr 8/8/2020 00:31",
"actionProjectRemove" : "jr 8/10/2020 00:29",
"actionProjectRename" : "jr 7/24/2020 11:33",
Expand Down Expand Up @@ -173,7 +173,7 @@
"offerToAddFirstProject" : "fn 4/26/2017 16:04",
"packageFormatMenuSpec" : "jr 8/31/2020 22:27",
"projectIndex" : "jr 8/10/2020 00:19",
"projectIndex:" : "jr 7/9/2022 09:37",
"projectIndex:" : "ct 5/2/2024 19:05",
"projectList" : "fn 4/11/2017 11:48",
"projectListMenu:shifted:" : "ct 10/4/2022 20:28",
"projectSelection" : "fn 4/11/2017 17:12",
Expand Down Expand Up @@ -210,6 +210,7 @@
"timeOfLastListUpdate" : "fn 4/11/2017 18:00",
"toggleMetadata" : "jr 3/17/2019 22:07",
"updateHistorianDecorationsMap" : "jr 7/2/2022 21:56",
"updateProjectSelection" : "ct 5/2/2024 19:05",
"wantsBranchListDrop:type:from:" : "jr 5/9/2020 14:30",
"wantsCommitListDrop:type:from:" : "jr 5/9/2020 14:44",
"wantsObjectListDrop:type:from:" : "jr 2/9/2020 00:08",
Expand Down

0 comments on commit d41d90d

Please sign in to comment.