Skip to content

Commit

Permalink
[bugfix] fix unordered favorites (#1236)
Browse files Browse the repository at this point in the history
  • Loading branch information
voigt authored Dec 9, 2022
1 parent 477ae50 commit 199672e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/db/bundb/timeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ func (t *timelineDB) GetFavedTimeline(ctx context.Context, accountID string, max

// Sort by favourite ID rather than status ID
slices.SortFunc(faves, func(a, b *gtsmodel.StatusFave) bool {
return a.ID < b.ID
return b.CreatedAt.Before(a.CreatedAt)
})

statuses := make([]*gtsmodel.Status, 0, len(faves))
Expand Down

0 comments on commit 199672e

Please sign in to comment.