Skip to content

Commit e2b0b35

Browse files
committed
Pretty links, paragraphs support
1 parent 6fd9998 commit e2b0b35

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Gopkg.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/posts/post.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,13 @@ func openPost(app *tview.Application, postcuid string, list *tview.List) {
3535
}()
3636

3737
var singlePost Post
38-
textView.SetText("[green::l]Loading...")
38+
textView.Write([]byte("[:green:l]Loading....[-:-:-]"))
3939
b, err := makeRequest(fmt.Sprintf("%s/%s", postAPI, postcuid))
4040
if err != nil {
4141
app.Stop()
4242
log.Fatal(err)
4343
}
44-
textView.SetText("")
45-
textView.ScrollToBeginning()
44+
textView.Clear()
4645

4746
err = json.Unmarshal(b, &singlePost)
4847
if err != nil {
@@ -102,6 +101,7 @@ func openPost(app *tview.Application, postcuid string, list *tview.List) {
102101
}
103102

104103
}
104+
textView.ScrollToBeginning()
105105

106106
textView.SetDoneFunc(func(key tcell.Key) {
107107
if key == tcell.KeyEscape {

0 commit comments

Comments
 (0)