diff --git a/assets/js/settings.js b/assets/js/settings.js index 99fa8719..f3965b29 100644 --- a/assets/js/settings.js +++ b/assets/js/settings.js @@ -17,7 +17,7 @@ export function setupSettings() { localCheckboxes.forEach(checkbox => { checkbox.checked = Boolean(store.get(checkbox.id)); checkbox.addEventListener('change', () => { - store.set(checkbox.id, checkbox.checked); + store.set(checkbox.id.replace('user_', ''), checkbox.checked); }); }); diff --git a/lib/philomena/galleries.ex b/lib/philomena/galleries.ex index 7011af4a..395e8e4f 100644 --- a/lib/philomena/galleries.ex +++ b/lib/philomena/galleries.ex @@ -266,7 +266,7 @@ defmodule Philomena.Galleries do Repo.insert_all( Interaction, changes, - on_conflict: {:replace_all_except, [:id]}, + on_conflict: {:replace, [:position]}, conflict_target: [:id] )