mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 15:32:25 -05:00
[feature] add support for polls + receiving federated status edits (#2330)
This commit is contained in:
parent
7204ccedc3
commit
e9e5dc5a40
84 changed files with 3992 additions and 570 deletions
23
internal/cache/size.go
vendored
23
internal/cache/size.go
vendored
|
|
@ -189,6 +189,8 @@ func totalOfRatios() float64 {
|
|||
config.GetCacheMediaMemRatio() +
|
||||
config.GetCacheMentionMemRatio() +
|
||||
config.GetCacheNotificationMemRatio() +
|
||||
config.GetCachePollMemRatio() +
|
||||
config.GetCachePollVoteMemRatio() +
|
||||
config.GetCacheReportMemRatio() +
|
||||
config.GetCacheStatusMemRatio() +
|
||||
config.GetCacheStatusFaveMemRatio() +
|
||||
|
|
@ -438,6 +440,27 @@ func sizeofNotification() uintptr {
|
|||
}))
|
||||
}
|
||||
|
||||
func sizeofPoll() uintptr {
|
||||
return uintptr(size.Of(>smodel.Poll{
|
||||
ID: exampleID,
|
||||
Multiple: func() *bool { ok := false; return &ok }(),
|
||||
HideCounts: func() *bool { ok := false; return &ok }(),
|
||||
Options: []string{exampleTextSmall, exampleTextSmall, exampleTextSmall, exampleTextSmall},
|
||||
StatusID: exampleID,
|
||||
ExpiresAt: exampleTime,
|
||||
}))
|
||||
}
|
||||
|
||||
func sizeofPollVote() uintptr {
|
||||
return uintptr(size.Of(>smodel.PollVote{
|
||||
ID: exampleID,
|
||||
Choices: []int{69, 420, 1337},
|
||||
AccountID: exampleID,
|
||||
PollID: exampleID,
|
||||
CreatedAt: exampleTime,
|
||||
}))
|
||||
}
|
||||
|
||||
func sizeofReport() uintptr {
|
||||
return uintptr(size.Of(>smodel.Report{
|
||||
ID: exampleID,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue