MCPcopy
hub / github.com/CapSoftware/Cap / syncSettingsState

Function syncSettingsState

apps/chrome-extension/src/content/overlay.tsx:741–758  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

739 };
740
741 const syncSettingsState = () => {
742 Promise.all([loadSettings(), loadWebcamPreviewDismissed()])
743 .then(([nextSettings, dismissed]) => {
744 if (disposed) return;
745 previewDismissedRef.current = dismissed;
746 setExtensionSettings(nextSettings);
747 if (
748 dismissed ||
749 !nextSettings.webcam.enabled ||
750 !nextSettings.webcam.deviceId
751 ) {
752 setRecordingPreviewActive(false);
753 setLivePreviewReady(false);
754 stopLocalPreview();
755 }
756 })
757 .catch(() => undefined);
758 };
759
760 const syncPreviewDismissedState = () => {
761 loadWebcamPreviewDismissed()

Callers 1

handleStorageChangeFunction · 0.85

Calls 2

loadSettingsFunction · 0.90

Tested by

no test coverage detected