alpha
Login
or
Join now
4uffin.bsky.social
/
core
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
My own copy of Tangled :)
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
appview: profile: limit events to 30
author
Anirudh Oppiliappan
date
1 year ago
(Mar 28, 2025, 11:09 PM +0200)
commit
020db941
020db9411ec6bc530941290945e287764bf4545b
parent
e52b67e8
e52b67e89797be85491c7b0b8488f10ba3ccf180
+5
1 changed file
Expand all
Collapse all
Unified
Split
appview
db
profile.go
+5
appview/db/profile.go
Reviewed
···
15
15
16
16
func MakeProfileTimeline(e Execer, forDid string) ([]ProfileTimelineEvent, error) {
17
17
timeline := []ProfileTimelineEvent{}
18
18
+
limit := 30
18
19
19
20
pulls, err := GetPullsByOwnerDid(e, forDid)
20
21
if err != nil {
···
70
71
sort.Slice(timeline, func(i, j int) bool {
71
72
return timeline[i].EventAt.After(timeline[j].EventAt)
72
73
})
74
74
+
75
75
+
if len(timeline) > limit {
76
76
+
timeline = timeline[:limit]
77
77
+
}
73
78
74
79
return timeline, nil
75
80
}