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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user