Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

remember previous recording options

Brendan Allan5ec354b71942
diff --git a/apps/desktop/src/utils/queries.ts b/apps/desktop/src/utils/queries.ts
index 610af7c95..99706c048 100644
--- a/apps/desktop/src/utils/queries.ts
+++ b/apps/desktop/src/utils/queries.ts
@@ -111,8 +111,15 @@ export function createOptionsQuery() {
const options = createQuery(() => ({
...getOptions,
select: (data) => {
- setState(data);
- return { ...state, ...data };
+ const ret = { ...data };
+
+ if (state.cameraLabel) ret.cameraLabel = state.cameraLabel;
+ if (state.audioInputName) ret.audioInputName = state.audioInputName;
+ if (state.mode) ret.mode = state.mode;
+
+ setState(ret);
+
+ return ret;
},
}));