Skip to content

Commit

Permalink
Rename UncollapseAll to ExpandAll
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanhaller committed Jan 13, 2025
1 parent d5374ac commit b04d1f5
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pkg/gui/controllers/commits_files_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ func (self *CommitFilesController) collapseAll() error {
}

func (self *CommitFilesController) expandAll() error {
self.context().CommitFileTreeViewModel.UncollapseAll()
self.context().CommitFileTreeViewModel.ExpandAll()

self.c.PostRefreshUpdate(self.context())

Expand Down
2 changes: 1 addition & 1 deletion pkg/gui/controllers/files_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ func (self *FilesController) collapseAll() error {
}

func (self *FilesController) expandAll() error {
self.context().FileTreeViewModel.UncollapseAll()
self.context().FileTreeViewModel.ExpandAll()

self.c.PostRefreshUpdate(self.context())

Expand Down
2 changes: 1 addition & 1 deletion pkg/gui/filetree/commit_file_tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (self *CommitFileTree) CollapseAll() {
}
}

func (self *CommitFileTree) UncollapseAll() {
func (self *CommitFileTree) ExpandAll() {
self.collapsedPaths.ExpandAll()
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/gui/filetree/commit_file_tree_view_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ func (self *CommitFileTreeViewModel) CollapseAll() {
}
}

func (self *CommitFileTreeViewModel) UncollapseAll() {
func (self *CommitFileTreeViewModel) ExpandAll() {
selectedNode := self.GetSelected()

self.ICommitFileTree.UncollapseAll()
self.ICommitFileTree.ExpandAll()

if selectedNode == nil {
return
Expand Down
4 changes: 2 additions & 2 deletions pkg/gui/filetree/file_tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type ITree[T any] interface {
ToggleCollapsed(path string)
CollapsedPaths() *CollapsedPaths
CollapseAll()
UncollapseAll()
ExpandAll()
}

type IFileTree interface {
Expand Down Expand Up @@ -183,7 +183,7 @@ func (self *FileTree) CollapseAll() {
}
}

func (self *FileTree) UncollapseAll() {
func (self *FileTree) ExpandAll() {
self.collapsedPaths.ExpandAll()
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/gui/filetree/file_tree_view_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,10 @@ func (self *FileTreeViewModel) CollapseAll() {
}
}

func (self *FileTreeViewModel) UncollapseAll() {
func (self *FileTreeViewModel) ExpandAll() {
selectedNode := self.GetSelected()

self.IFileTree.UncollapseAll()
self.IFileTree.ExpandAll()

if selectedNode == nil {
return
Expand Down

0 comments on commit b04d1f5

Please sign in to comment.