@reffuse/extension-query 0.1.5 #16
@@ -188,11 +188,10 @@ export const run = <K extends readonly unknown[], A, E>(
|
|||||||
if (typeof window !== "undefined" && (options?.refreshOnWindowFocus ?? true))
|
if (typeof window !== "undefined" && (options?.refreshOnWindowFocus ?? true))
|
||||||
yield* Stream.runForEach(BrowserStream.fromEventListenerWindow("focus"), () => self.forkRefresh)
|
yield* Stream.runForEach(BrowserStream.fromEventListenerWindow("focus"), () => self.forkRefresh)
|
||||||
|
|
||||||
yield* Effect.addFinalizer(() => self.interrupt).pipe(
|
yield* Effect.addFinalizer(() => self.interrupt)
|
||||||
Effect.andThen(Stream.runForEach(Stream.changes(self.queryKey), latestKey =>
|
yield* Stream.runForEach(Stream.changes(self.queryKey), latestKey =>
|
||||||
Ref.set(self.latestKeyRef, Option.some(latestKey)).pipe(
|
Ref.set(self.latestKeyRef, Option.some(latestKey)).pipe(
|
||||||
Effect.andThen(self.forkFetch)
|
Effect.andThen(self.forkFetch)
|
||||||
)
|
)
|
||||||
))
|
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user