Use stable profile for spaces created from private context

This commit is contained in:
2026-05-08 22:44:07 -04:00
parent 60426b6c18
commit 82e2ccd16d
2 changed files with 25 additions and 1 deletions
+6 -1
View File
@@ -190,7 +190,12 @@ impl BrowserCore {
accent_hex: u32,
) -> Result<SpaceId, CoreError> {
let sort_key = self.next_space_sort_key();
let space = Space::new(name, icon, accent_hex, self.active_profile_id.clone(), sort_key);
let default_profile_id = if self.active_profile()?.kind() == &ProfileKind::Private {
self.active_space()?.default_profile_id().clone()
} else {
self.active_profile_id.clone()
};
let space = Space::new(name, icon, accent_hex, default_profile_id, sort_key);
let space_id = space.id().clone();
let default_profile_id = space.default_profile_id().clone();
let tab = self.build_tab_for(space_id.clone(), default_profile_id, self.new_tab_url()?);