From 2a207fd6138601d4066053ba089baf074002e5c2 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Thu, 19 Mar 2026 17:22:58 +0000 Subject: [PATCH] Fix updating notification counts on events --- html/template/sync/layout/authenticated.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/html/template/sync/layout/authenticated.html b/html/template/sync/layout/authenticated.html index 8dc9a8b8..d67bffd1 100644 --- a/html/template/sync/layout/authenticated.html +++ b/html/template/sync/layout/authenticated.html @@ -53,7 +53,11 @@ async function updateUserState() { const response = await fetch("/api/user"); const data = await response.json(); - Alpine.store("user", data); + // Update properties instead of replacing the whole store which leverages Alpine's reactivity + const store_user = Alpine.store("user"); + Object.keys(data).forEach(key => { + store_user[key] = data[key]; + }); } document.addEventListener("DOMContentLoaded", function () { var popoverTriggerList = [].slice.call(