Skip to content

Commit

Permalink
minor: use m.thread instead of m.op.thread
Browse files Browse the repository at this point in the history
  • Loading branch information
azimut committed Apr 26, 2023
1 parent 55b1d3d commit e71544b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/fourchan/tui.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
m.render, cmd = m.render.Update(msg)
switch msg := msg.(type) {
case tea.WindowSizeMsg:
m.op.thread.width = 200
m.width = 200
m.render.RawContent = fmt.Sprint(m)
m.op.thread.width = uint(msg.Width) - rightPadding
m.width = uint(msg.Width) - rightPadding
m.render.Viewport.SetContent(fmt.Sprint(m))
}
return m, cmd
Expand Down
4 changes: 2 additions & 2 deletions internal/hackernews/tui.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
m.render, cmd = m.render.Update(msg)
switch msg := msg.(type) {
case tea.WindowSizeMsg:
m.op.thread.Width = 200
m.Width = 200
m.render.RawContent = fmt.Sprint(m)
m.op.thread.Width = uint(msg.Width) - rightPadding
m.Width = uint(msg.Width) - rightPadding
m.render.Viewport.SetContent(fmt.Sprint(m))
}
return m, cmd
Expand Down

0 comments on commit e71544b

Please sign in to comment.