chanding the architecure, removing the views ability to emit or listen to events

I liked my idea better but I recon I will hit less obstacles this way
This commit is contained in:
2026-02-24 23:22:19 +00:00
parent f40894577d
commit e64b1c31b9
12 changed files with 274 additions and 262 deletions
-9
View File
@@ -2,16 +2,12 @@ package views
import (
"esdi/tui/internal/dom"
"esdi/tui/internal/events"
"esdi/tui/internal/ui"
"slices"
"github.com/rivo/tview"
)
func AddAndShowPage(
bus *events.Bus,
doc *dom.DOM,
pages *tview.Pages,
page *dom.UINode,
changeFocus bool,
@@ -23,11 +19,6 @@ func AddAndShowPage(
pages.SwitchToPage(page.ID)
}
// Set focus to our new tool
if changeFocus {
bus.Emit(ui.ChangeFocusEv{Target: page.Self})
}
return nil
}