Add profile sync policy controls

This commit is contained in:
2026-05-08 03:44:36 -04:00
parent 38a847c27e
commit ada0a82da8
6 changed files with 139 additions and 10 deletions
+15 -2
View File
@@ -8,8 +8,8 @@ mod splits;
use ely_browser_core::{BrowserCore, InitialBrowserConfig};
use ely_domain::{
ArchivePolicy, CommandIntent, DownloadPolicy, FavoriteLimit, HistoryRecordingPolicy,
NewTabDestination, ProfileId, SearchEngine, SpaceId, SyncObjectKind, SyncObjectPolicy, TabId,
UrlText,
NewTabDestination, ProfileId, ProfileSyncPolicy, SearchEngine, SpaceId, SyncObjectKind,
SyncObjectPolicy, TabId, UrlText,
};
use gpui::{App, AppContext, Context, Entity, FocusHandle, Focusable, Subscription, Window};
use gpui_component::input::{InputEvent, InputState, SelectAll};
@@ -311,6 +311,19 @@ impl ElyShell {
}
}
fn set_profile_sync_policy(
&mut self,
profile_id: &ProfileId,
sync_policy: ProfileSyncPolicy,
cx: &mut Context<Self>,
) {
if let ShellState::Ready(core) = &mut self.state
&& core.set_profile_sync_policy(profile_id, sync_policy).is_ok()
{
cx.notify();
}
}
fn set_favorite_limit(&mut self, favorite_limit: FavoriteLimit, cx: &mut Context<Self>) {
if let ShellState::Ready(core) = &mut self.state {
core.set_favorite_limit(favorite_limit);