mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-10-31 22:18:52 +00:00
preallocate stylesheet slices
This commit is contained in:
parent
54d53a10ef
commit
aca98638e0
2 changed files with 23 additions and 6 deletions
|
@ -140,10 +140,19 @@ func (m *Module) profileGETHandler(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
// Prepare stylesheets for profile.
|
||||
stylesheets := make([]string, 0, 6)
|
||||
|
||||
// Basic profile stylesheets.
|
||||
stylesheets := []string{
|
||||
cssFA, cssStatus, cssThread, cssProfile,
|
||||
}
|
||||
stylesheets = append(
|
||||
stylesheets,
|
||||
[]string{
|
||||
cssFA,
|
||||
cssStatus,
|
||||
cssThread,
|
||||
cssProfile,
|
||||
}...,
|
||||
)
|
||||
|
||||
// User-selected theme if set.
|
||||
if theme := targetAccount.Theme; theme != "" {
|
||||
|
|
|
@ -138,10 +138,18 @@ func (m *Module) threadGETHandler(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
// Prepare stylesheets for thread.
|
||||
stylesheets := make([]string, 0, 5)
|
||||
|
||||
// Basic thread stylesheets.
|
||||
stylesheets := []string{
|
||||
cssFA, cssStatus, cssThread,
|
||||
}
|
||||
stylesheets = append(
|
||||
stylesheets,
|
||||
[]string{
|
||||
cssFA,
|
||||
cssStatus,
|
||||
cssThread,
|
||||
}...,
|
||||
)
|
||||
|
||||
// User-selected theme if set.
|
||||
if theme := targetAccount.Theme; theme != "" {
|
||||
|
|
Loading…
Reference in a new issue