mirror of
https://github.com/mrusme/neonmodem.git
synced 2024-09-08 04:25:53 -04:00
Fixed texarea reset, prompt
This commit is contained in:
parent
826f81a9d9
commit
761dc57e93
@ -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" {
|
||||
|
Loading…
Reference in New Issue
Block a user