Fixed timer issue in debug log collection

This commit is contained in:
maziggy
2026-01-05 10:01:51 +01:00
parent 50fd0c018b
commit 6794846ac0
3 changed files with 5 additions and 4 deletions
+3 -2
View File
@@ -105,8 +105,9 @@ export function SystemInfoPage() {
const handleToggleDebugLogging = async () => {
setDebugToggling(true);
try {
await supportApi.setDebugLogging(!debugLoggingState?.enabled);
queryClient.invalidateQueries({ queryKey: ['debugLogging'] });
const newState = await supportApi.setDebugLogging(!debugLoggingState?.enabled);
// Immediately update the cache with the new state (includes fresh enabled_at timestamp)
queryClient.setQueryData(['debugLogging'], newState);
} catch (err) {
console.error('Failed to toggle debug logging:', err);
} finally {