Versie 0.2.0
This commit is contained in:
commit
e77d8fd373
495 files changed
+81026
No files matched your search
@@ -0,0 +1,18 @@
|
||||
// Generated, do not edit. sha256:671ad1d61da792d482cd1cb3577e28a415b868ce12182a75eeb1a59b5fd96682
|
||||
import { changesSince } from './data/bus.js';
|
||||
import { dispatchChanges } from './data/_rpc.js';
|
||||
|
||||
let cursor = null;
|
||||
|
||||
export async function pollChanges() {
|
||||
let uitslag;
|
||||
try {
|
||||
uitslag = await changesSince(cursor);
|
||||
} catch {
|
||||
return [];
|
||||
}
|
||||
if (!uitslag || typeof uitslag !== 'object') return [];
|
||||
cursor = Number.isInteger(uitslag.cursor) ? uitslag.cursor : cursor;
|
||||
if (uitslag.reset) return dispatchChanges(['app-refresh']);
|
||||
return dispatchChanges(uitslag.names);
|
||||
}
|
||||
Reference in new issue
Block a user