Skip to content

Commit

Permalink
fix log page flicker (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
kitemongerer authored Nov 14, 2024
1 parent bb3e871 commit 6dbf3ef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/tui/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/charmbracelet/bubbles/viewport"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"

"github.com/renderinc/cli/pkg/client"
lclient "github.com/renderinc/cli/pkg/client/logs"
)
Expand Down Expand Up @@ -36,6 +37,7 @@ func NewLogModel(filter *FilterModel, loadFunc TypedCmd[*LogResult]) *LogModel {
filterModel: filter,
scrollBar: NewScrollBarModel(1, 0),
viewport: viewport.New(0, 0),
state: logStateLoading,
}
}

Expand Down Expand Up @@ -189,7 +191,7 @@ func (m *LogModel) setViewPortSize() {
}

func (m *LogModel) View() string {
if m.state == logStateLoading {
if m.state != logStateLoaded {
return "\n Loading Logs..."
}
logContent := viewportSylte.Render(m.viewport.View())
Expand Down

0 comments on commit 6dbf3ef

Please sign in to comment.