From 199672e58631813d89e935928dd79c475104f400 Mon Sep 17 00:00:00 2001 From: Christoph Voigt Date: Fri, 9 Dec 2022 11:46:52 +0100 Subject: [PATCH] [bugfix] fix unordered favorites (#1236) --- internal/db/bundb/timeline.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/db/bundb/timeline.go b/internal/db/bundb/timeline.go index a6e3554f..b52b6845 100644 --- 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))