commit 199672e58631813d89e935928dd79c475104f400
parent 477ae50933ab7447757752ec35bf898db287acff
Author: Christoph Voigt <voigt.christoph@gmail.com>
Date: Fri, 9 Dec 2022 11:46:52 +0100
[bugfix] fix unordered favorites (#1236)
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/internal/db/bundb/timeline.go b/internal/db/bundb/timeline.go
@@ -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))