mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 04:22:24 -05:00
more code comments
This commit is contained in:
parent
50805fac53
commit
e762577179
1 changed files with 3 additions and 0 deletions
3
internal/cache/timeline/status.go
vendored
3
internal/cache/timeline/status.go
vendored
|
|
@ -680,8 +680,11 @@ func (t *StatusTimeline) InsertOne(status *gtsmodel.Status, prepared *apimodel.S
|
|||
return
|
||||
}
|
||||
|
||||
// insert will insert given StatusMeta into timeline, and
|
||||
// if beyond t.max will initiate a timeline trim operation.
|
||||
func (t *StatusTimeline) insert(metas ...*StatusMeta) {
|
||||
if t.cache.Insert(metas...) > t.max {
|
||||
|
||||
// If cache reached beyond
|
||||
// maximum, perform a trim.
|
||||
t.Trim()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue