mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 19:12:25 -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
|
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()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue