fix: integrate browser-to-editor file loading and remove sample text
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"pad/internal/io/pool"
|
||||
"pad/internal/ui"
|
||||
)
|
||||
|
||||
@@ -76,5 +77,8 @@ func HandleBrowserTap(bm *BrowserManager, s *BrowserState, index int) {
|
||||
// Open file
|
||||
s.SelectedIndex = index
|
||||
ui.OpenFile(entry.Path)
|
||||
// Dispatch ReadFileTask to the worker pool
|
||||
task := pool.NewReadFileTask(entry.Path, bm.fs)
|
||||
bm.workerPool.Dispatch(task)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user