mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-04 14:18:07 -06:00
[bugfix] fix unordered favorites (#1245)
* [bugfix] fix unordered favorites * add test for favouritesget * add license to new test files
This commit is contained in:
parent
58c87bdd7f
commit
8703933df4
4 changed files with 202 additions and 1 deletions
|
|
@ -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 b.CreatedAt.Before(a.CreatedAt)
|
||||
return a.ID > b.ID
|
||||
})
|
||||
|
||||
statuses := make([]*gtsmodel.Status, 0, len(faves))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue