1
0
mirror of https://github.com/mrusme/neonmodem.git synced 2024-09-22 04:35:55 -04:00

Fixed texarea reset, prompt

This commit is contained in:
マリウス 2022-12-31 21:09:43 -05:00
parent 826f81a9d9
commit 761dc57e93
No known key found for this signature in database
GPG Key ID: 272ED814BF63261F

View File

@ -64,7 +64,9 @@ type Model struct {
}
func (m Model) Init() tea.Cmd {
return m.refresh()
// TODO: Doesn't seem to be working
// return m.refresh()
return nil
}
func NewModel(c *ctx.Ctx) Model {
@ -88,6 +90,7 @@ func NewModel(c *ctx.Ctx) Model {
m.textarea = textarea.New()
m.textarea.Placeholder = "Type in your reply ..."
m.textarea.Prompt = ""
m.a, _ = aggregator.New(m.ctx)
@ -120,6 +123,8 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
case key.Matches(msg, m.keymap.Close):
if m.focused == "post" {
// Let's make sure we reset the texarea
m.textarea.Reset()
m.focused = "list"
return m, nil
} else if m.focused == "reply" {