Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Clear Cast state after pairing registration

Manav Rathiac747b8d9d53
diff --git a/web/apps/cast/src/pages/index.tsx b/web/apps/cast/src/pages/index.tsx
index f57f83db91..81eb4212db 100644
--- a/web/apps/cast/src/pages/index.tsx
+++ b/web/apps/cast/src/pages/index.tsx
@@ -20,8 +20,6 @@ const Page: React.FC = () => {
const router = useRouter();
- useEffect(() => clearCastData(), []);
-
useEffect(() => {
if (!pairingCode) {
void register().then((r) => {
@@ -30,6 +28,7 @@ const Page: React.FC = () => {
setPairingCode(r.pairingCode);
});
} else {
+ clearCastData();
advertiseOnChromecast(
() => pairingCode,
() => readCastData()?.collectionID,