Skip to content

Commit

Permalink
twitter: tui fix links
Browse files Browse the repository at this point in the history
  • Loading branch information
azimut committed May 5, 2023
1 parent dc44409 commit 01c4666
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/twitter/tui.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package twitter

import (
"fmt"

"github.com/azimut/cli-view/internal/tui"
tea "github.com/charmbracelet/bubbletea"
)
Expand All @@ -29,11 +27,13 @@ func (m Model) View() string {

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
var cmd tea.Cmd
if m.render.RawContent == "" {
m.render.RawContent = m.String()
}
m.render, cmd = m.render.Update(msg)
switch msg.(type) {
case tea.WindowSizeMsg:
m.render.RawContent = fmt.Sprint(m)
m.render.Viewport.SetContent(fmt.Sprint(m))
m.render.Viewport.SetContent(m.String())
}
return m, cmd
}

0 comments on commit 01c4666

Please sign in to comment.