philomena-dev / philomena

Next-generation imageboard
GNU Affero General Public License v3.0
84 stars 29 forks source link

Galleries not re-indexed after image hide #316

Open mdashlw opened 5 days ago

mdashlw commented 5 days ago

Philomena.Images#hide_image_multi (used when image is deleted or hidden due to merge) decrements image_count of all relevant galleries and deletes all relevant Philomena.Galleries.Interactions, however, it doesn't queue a re-index of these galleries, causing the following indexed fields to be out of sync:

image_count: gallery.image_count,
image_ids: Enum.map(gallery.interactions, & &1.image_id),