[bugfix] fix unordered favorites (#1236)

This commit is contained in:
Christoph Voigt 2022-12-09 11:46:52 +01:00 committed by GitHub
parent 477ae50933
commit 199672e586
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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))