more code comments

This commit is contained in:
kim 2025-04-07 19:03:04 +01:00
commit e762577179

View file

@ -680,8 +680,11 @@ func (t *StatusTimeline) InsertOne(status *gtsmodel.Status, prepared *apimodel.S
return 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) { func (t *StatusTimeline) insert(metas ...*StatusMeta) {
if t.cache.Insert(metas...) > t.max { if t.cache.Insert(metas...) > t.max {
// If cache reached beyond // If cache reached beyond
// maximum, perform a trim. // maximum, perform a trim.
t.Trim() t.Trim()