| 179 | } |
| 180 | |
| 181 | func (self *FileTree) SetTree() { |
| 182 | filesForDisplay := self.getFilesForDisplay() |
| 183 | guiConfig := self.common.UserConfig().Gui |
| 184 | showRootItem := guiConfig.ShowRootItemInFileTree |
| 185 | cmp := NodeSortComparator[models.File](guiConfig.FileTreeSortOrder, guiConfig.FileTreeSortCaseSensitive) |
| 186 | if self.showTree { |
| 187 | self.tree = BuildTreeFromFiles(filesForDisplay, showRootItem, cmp) |
| 188 | } else { |
| 189 | self.tree = BuildFlatTreeFromFiles(filesForDisplay, showRootItem, cmp) |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | func (self *FileTree) IsCollapsed(path string) bool { |
| 194 | return self.collapsedPaths.IsCollapsed(path) |