Lock private profile sync state

This commit is contained in:
2026-05-08 20:19:09 -04:00
parent a299815e51
commit 8e450496e0
5 changed files with 58 additions and 4 deletions
+9 -1
View File
@@ -97,11 +97,19 @@ impl Profile {
self.sync_policy
}
#[must_use]
pub fn allows_sync(&self) -> bool {
self.kind == ProfileKind::Standard
}
pub fn set_download_policy(&mut self, download_policy: DownloadPolicy) {
self.download_policy = download_policy;
}
pub fn set_sync_policy(&mut self, sync_policy: ProfileSyncPolicy) {
self.sync_policy = sync_policy;
self.sync_policy = match self.kind {
ProfileKind::Standard => sync_policy,
ProfileKind::Private => ProfileSyncPolicy::Paused,
};
}
}