Skip to content

Commit

Permalink
fix missing line break between votes
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkr committed Jan 8, 2024
1 parent 45d2d24 commit 94ecd14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions front/print.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ func (r *request) PrintNote(w text.Writer, note *ap.Object, author *ap.Actor, gr
}

func (r *request) PrintNotes(w text.Writer, rows data.OrderedMap[string, noteMetadata], printAuthor, printParentAuthor, printDaySeparators bool) {
var lastDay int64
lastDay := int64(-1)
rows.Range(func(noteString string, meta noteMetadata) bool {
note := ap.Object{}
if err := json.Unmarshal([]byte(noteString), &note); err != nil {
Expand Down Expand Up @@ -413,7 +413,7 @@ func (r *request) PrintNotes(w text.Writer, rows data.OrderedMap[string, noteMet

currentDay := note.Published.Unix() / (60 * 60 * 24)

if lastDay > 0 {
if lastDay >= 0 {
if !printDaySeparators || currentDay == lastDay {
w.Empty()
} else {
Expand Down

0 comments on commit 94ecd14

Please sign in to comment.