Explorar el Código

Made create widget display new issue after write

arianagiroux hace 2 semanas
padre
commit
1d89d38afd
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3 3
      tui.go

+ 3 - 3
tui.go

@@ -111,10 +111,10 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
 		cmds = append(cmds, cmd, w.render)
 	case Issue:
 		m.widget, cmd = w.update(msg)
-		cmds = append(cmds, cmd)
+		cmds = append(cmds, cmd, w.render)
 	case IssueCollection:
 		m.widget, cmd = w.update(msg)
-		cmds = append(cmds, cmd)
+		cmds = append(cmds, cmd, w.render)
 	case createInCollection:
 		m.widget, cmd = w.update(msg)
 		cmds = append(cmds, cmd, w.render)
@@ -303,7 +303,7 @@ func (c create) update(msg tea.Msg) (widget, tea.Cmd) {
 		case bool:
 			if !value {
 			} else {
-				cmds = append(cmds, tea.Quit)
+				cmds = append(cmds, func() tea.Msg { return loadPath(c.Path) })
 			}
 		case error:
 			c.err = value