Skip to content

Commit

Permalink
Don't recreate album/timeline scenes on height change
Browse files Browse the repository at this point in the history
  • Loading branch information
SmilyOrg committed Oct 27, 2024
1 parent be7970d commit aac9e3d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,13 @@ func (*Api) GetScenes(w http.ResponseWriter, r *http.Request, params openapi.Get
}
sceneConfig.Collection = collection

// Disregard viewport height for album and timeline layouts
// as they are invariant to it
switch sceneConfig.Layout.Type {
case layout.Album, layout.Timeline:
sceneConfig.Layout.ViewportHeight = 0
}

scenes := sceneSource.GetScenesWithConfig(sceneConfig)
sort.Slice(scenes, func(i, j int) bool {
a := scenes[i]
Expand Down

0 comments on commit aac9e3d

Please sign in to comment.