mirror of
https://github.com/Slug-Boi/cocommit.git
synced 2026-05-13 12:45:47 +00:00
refactor: changed all models for the tui to be in a proper tree structure
All tui elemnts should now be children models to a parent model where applicable. This should eliminate the weird key regristration issues seen before and now adhere to proper bubbletea standards
This commit is contained in:
@@ -204,15 +204,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
case key.Matches(msg, m.keys.tempAdd):
|
||||
screen.Clear()
|
||||
screen.MoveTopLeft()
|
||||
tempAuthr := Entry_TA()
|
||||
if tempAuthr != "" {
|
||||
split := strings.Split(tempAuthr, ":")
|
||||
item_str := split[0] + " - " + split[1]
|
||||
dupProtect[item_str] = tempAuthr
|
||||
i := item(item_str)
|
||||
m.list.InsertItem(len(m.list.Items())+1, i)
|
||||
selectToggle(i)
|
||||
}
|
||||
sub_model = tempAuthorModel(&m)
|
||||
return m, tea.ClearScreen
|
||||
|
||||
case key.Matches(msg, m.keys.createAuthor):
|
||||
|
||||
Reference in New Issue
Block a user