Skip to content

Commit

Permalink
Allow URI mapping on tree
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Dec 24, 2024
1 parent ce61268 commit 5be10b3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions widget/filetree.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ func NewFileTree(root fyne.URI) *FileTree {
return tree
}

// MapURI allows an app to return a specific URI for the given uid.
// This can be helpful to make more custom trees based on file structure/
func (t *FileTree) MapURI(uid string, target fyne.URI) {
t.uriCache[uid] = target
t.Refresh()
}

func (t *FileTree) filter(uris []fyne.URI) []fyne.URI {
filter := t.Filter
if filter == nil {
Expand Down

0 comments on commit 5be10b3

Please sign in to comment.