Add update policy controls

This commit is contained in:
2026-05-09 04:13:41 -04:00
parent 726471ea64
commit e30fce9213
7 changed files with 212 additions and 17 deletions
+19 -1
View File
@@ -1,6 +1,6 @@
use ely_domain::{
ArchivePolicy, DownloadPolicy, FavoriteLimit, HistoryRecordingPolicy, NewTabDestination,
ProfileId, ProfileSyncPolicy, SearchEngine, SyncObjectKind, SyncObjectPolicy,
ProfileId, ProfileSyncPolicy, SearchEngine, SyncObjectKind, SyncObjectPolicy, UpdatePolicy,
};
use gpui::Context;
@@ -151,6 +151,24 @@ impl ElyShell {
}
}
pub(super) fn set_update_policy(
&mut self,
update_policy: UpdatePolicy,
cx: &mut Context<Self>,
) {
if let ShellState::Ready(core) = &mut self.state {
core.set_update_policy(update_policy);
cx.notify();
}
}
pub(super) fn reset_update_settings(&mut self, cx: &mut Context<Self>) {
if let ShellState::Ready(core) = &mut self.state {
core.reset_update_settings();
cx.notify();
}
}
pub(super) fn archive_idle_tabs_now(&mut self, cx: &mut Context<Self>) {
if let ShellState::Ready(core) = &mut self.state
&& core.archive_idle_tabs(std::time::SystemTime::now()).is_ok()