From 982378e9b42ef1cf10bba044a956728a1d656f13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=9E=E3=83=AA=E3=82=A6=E3=82=B9?= Date: Sat, 3 Apr 2021 16:28:41 -0500 Subject: [PATCH] Fixed toot display bug --- mast/timeline.go | 2 +- tui/timeline.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mast/timeline.go b/mast/timeline.go index 43ade28..3d62dab 100644 --- a/mast/timeline.go +++ b/mast/timeline.go @@ -71,7 +71,7 @@ func (timeline *Timeline) Load(timelineType TimelineType) (error) { } oldestStatusIndex := len(statuses) - 1 - for i := oldestStatusIndex; i > 0; i-- { + for i := oldestStatusIndex; i >= 0; i-- { status := statuses[i] id := string(status.ID) diff --git a/tui/timeline.go b/tui/timeline.go index adb8b8f..78092b0 100644 --- a/tui/timeline.go +++ b/tui/timeline.go @@ -17,6 +17,6 @@ func RenderTimeline(timeline *mast.Timeline, width int) (string, error) { output = fmt.Sprintf("%s%s\n", output, tootOutput) } - timeline.LastRenderedIndex = newRenderedIndex + timeline.LastRenderedIndex = (newRenderedIndex - 1) return output, err }