fix: keep device sync's notes out of the warning toast of debug builds #34

This commit is contained in:
Linus Rath
2026-09-27 11:23:44 +02:00
parent 157ea398b8
commit 10edc331a5
+4 -1
View File
@@ -133,8 +133,11 @@ export function createTaskDeps(): EngineDeps {
useDeviceSyncStore.getState().recordKnownState(registryId, jmapAccountId, type, state);
},
notifyAuthProblem,
// Notes like "account d left out" only inform; an exception is worth a
// warning (in debug builds every warning puts LogBox over the app).
log: (message, detail) => {
console.warn(`[device-sync] ${message}`, detail instanceof Error ? detail.message : (detail ?? ''));
if (detail instanceof Error) console.warn(`[device-sync] ${message}`, detail.message);
else console.log(`[device-sync] ${message}`, detail ?? '');
},
};
}