Skip to content

Commit

Permalink
feat(story): Using linked image in preview if present
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed Jul 14, 2022
1 parent 24419b8 commit 2211e3a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/crud/story.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ func (a App) story(r *http.Request, request provider.Request, item absto.Item, f
var hasMap bool

for _, item := range files {
if cover == nil {
if cover == nil || (len(r.URL.Fragment) != 0 && cover["ID"] != item.ID) {
cover = map[string]any{
"ID": item.ID,
"Img": provider.StorageToRender(item, request),
"ImgHeight": thumbnail.SmallSize,
"ImgWidth": thumbnail.SmallSize,
Expand Down

0 comments on commit 2211e3a

Please sign in to comment.