π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
gen
Manav Rathi8b75393ea08f
diff --git a/web/apps/cast/src/pages/slideshow.tsx b/web/apps/cast/src/pages/slideshow.tsxindex c3e9507835..6d1eee6054 100644--- a/web/apps/cast/src/pages/slideshow.tsx+++ b/web/apps/cast/src/pages/slideshow.tsx@@ -36,9 +36,10 @@ export default function Slideshow() {};const advance = async () => {+ console.log("in advance");if (!urlGenerator) throw new Error("Unexpected state");- const urls = await urlGenerator.next();- if (!urls) {+ const { value: urls, done } = await urlGenerator.next();+ if (done) {log.warn("Empty collection");// Go back to pairing pagerouter.push("/");@@ -182,7 +183,10 @@ export default function Slideshow() {};}, [loading]);- if (loading) return <PairedSuccessfullyOverlay />;+ console.log({ a: "render", loading, currentFileURL, nextFileURL });++ if (loading || !currentFileURL || !nextFileURL)+ return <PairedSuccessfullyOverlay />;return <SlideView url={currentFileURL} nextURL={nextFileURL} />;}diff --git a/web/apps/cast/src/services/cast.ts b/web/apps/cast/src/services/cast.tsindex 4312178c34..af069dfcfd 100644--- a/web/apps/cast/src/services/cast.ts+++ b/web/apps/cast/src/services/cast.ts@@ -78,15 +78,15 @@ export const readCastData = (): CastData => {* collection, and just moves onward to the next one. It will however throw if* there are errors in getting the collection itself.*- * If there are no renderable image in the collection, it resolves with- * `undefined`.+ * If there are no renderable image in the collection, the sequence ends by+ * yielding `done: true`.** @param castData The collection to show and credentials to fetch the files* within it.*/export const renderableURLs = async function* (castData: CastData) {const { collectionKey, castToken } = castData;- let previousURL: string | undefined+ let previousURL: string | undefined;while (true) {const collection = await getCollection(castToken, collectionKey);await syncPublicFiles(castToken, collection, () => {});@@ -94,6 +94,7 @@ export const renderableURLs = async function* (castData: CastData) {const files = allFiles.filter((file) => isFileEligibleForCast(file));for (const file of files) {+ console.log("in generator", previousURL);if (!previousURL) {previousURL = await createRenderableURL(castToken, file);continue;