Skip to content

Commit 19cbc64

Browse files
feat: Introduce new and improved recording picker
2 parents dd4ab52 + 7d86c79 commit 19cbc64

File tree

32 files changed

+2584
-656
lines changed

32 files changed

+2584
-656
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/desktop/src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cap-desktop"
3-
version = "0.3.83"
3+
version = "0.3.84"
44
description = "Beautiful screen recordings, owned by you."
55
authors = ["you"]
66
edition = "2024"

apps/desktop/src-tauri/src/general_settings.rs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ pub struct GeneralSettingsStore {
113113
)]
114114
pub enable_new_recording_flow: bool,
115115
#[serde(default)]
116+
pub recording_picker_preference_set: bool,
117+
#[serde(default)]
116118
pub post_deletion_behaviour: PostDeletionBehaviour,
117119
#[serde(default = "default_excluded_windows")]
118120
pub excluded_windows: Vec<WindowExclusion>,
@@ -128,7 +130,7 @@ fn default_enable_native_camera_preview() -> bool {
128130
}
129131

130132
fn default_enable_new_recording_flow() -> bool {
131-
cfg!(debug_assertions)
133+
true
132134
}
133135

134136
fn no(_: &bool) -> bool {
@@ -180,6 +182,7 @@ impl Default for GeneralSettingsStore {
180182
enable_native_camera_preview: default_enable_native_camera_preview(),
181183
auto_zoom_on_clicks: false,
182184
enable_new_recording_flow: default_enable_new_recording_flow(),
185+
recording_picker_preference_set: false,
183186
post_deletion_behaviour: PostDeletionBehaviour::DoNothing,
184187
excluded_windows: default_excluded_windows(),
185188
delete_instant_recordings_after_upload: false,
@@ -240,7 +243,7 @@ impl GeneralSettingsStore {
240243
pub fn init(app: &AppHandle) {
241244
println!("Initializing GeneralSettingsStore");
242245

243-
let store = match GeneralSettingsStore::get(app) {
246+
let mut store = match GeneralSettingsStore::get(app) {
244247
Ok(Some(store)) => store,
245248
Ok(None) => GeneralSettingsStore::default(),
246249
Err(e) => {
@@ -249,7 +252,14 @@ pub fn init(app: &AppHandle) {
249252
}
250253
};
251254

252-
store.save(app).unwrap();
255+
if !store.recording_picker_preference_set {
256+
store.enable_new_recording_flow = true;
257+
store.recording_picker_preference_set = true;
258+
}
259+
260+
if let Err(e) = store.save(app) {
261+
error!("Failed to save general settings: {}", e);
262+
}
253263

254264
println!("GeneralSettingsState managed");
255265
}

0 commit comments

Comments
 (0)