diff options
author | Joe <rbo@gmx.us> | 2024-01-02 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-01-02 20:20:20 +0100 |
commit | cba23583019b67b936ed15e001aebe42d6225f0e (patch) | |
tree | 9b9533d76a3feb69ef43ae371ed76fb52391694b | |
parent | building (diff) | |
download | hardflip-cba23583019b67b936ed15e001aebe42d6225f0e.tar.gz hardflip-cba23583019b67b936ed15e001aebe42d6225f0e.tar.bz2 hardflip-cba23583019b67b936ed15e001aebe42d6225f0e.tar.xz hardflip-cba23583019b67b936ed15e001aebe42d6225f0e.tar.zst hardflip-cba23583019b67b936ed15e001aebe42d6225f0e.zip |
wip
Diffstat (limited to '')
-rw-r--r-- | c_hardflip.go | 1 | ||||
-rw-r--r-- | c_litems.go | 18 | ||||
-rw-r--r-- | i_ui.go | 1 |
3 files changed, 20 insertions, 0 deletions
diff --git a/c_hardflip.go b/c_hardflip.go index aea573b..4fd2b9f 100644 --- a/c_hardflip.go +++ b/c_hardflip.go @@ -89,5 +89,6 @@ func main() { // } // } + // PERF: test performance over a large amount of hosts with litems i_ui(&data) } diff --git a/c_litems.go b/c_litems.go index a623812..a104e6c 100644 --- a/c_litems.go +++ b/c_litems.go @@ -63,6 +63,24 @@ type ItemsList struct { last *ItemsNode } +func (litems *ItemsList) is_dir(id int) bool { + curr := litems.head + + if curr == nil { + return false + } + for curr.next != nil && curr.ID != id { + curr = curr.next + } + if curr.ID != id { + return false + } + if curr.Dirs != nil { + return true + } + return false +} + func (litems *ItemsList) add_back(node *ItemsNode) { new_node := node @@ -284,6 +284,7 @@ func i_host_panel_host(ui HardUI, opts HardOpts, } func i_host_panel(ui HardUI, opts HardOpts, ldirs *DirsList) { + // TODO: litems instead of lhosts i_draw_box(ui.s, 0, 0, ui.dim[W] / 3, ui.dim[H] - 2, " Hosts ", false) |