perf(sync): avoid snapshot clone when scheduling uploads

This commit is contained in:
2026-05-16 05:19:54 -04:00
parent 51f836f34c
commit 0c9bfc2673
2 changed files with 12 additions and 10 deletions
+11
View File
@@ -88,6 +88,17 @@ impl BrowserCore {
self.sync_connection_state = state;
}
#[must_use]
pub fn cloud_sync_upload_enabled(&self) -> bool {
matches!(
self.sync_connection_state,
SyncConnectionState::SignedIn
| SyncConnectionState::AwaitingDeviceApproval
| SyncConnectionState::SyncReady { .. }
| SyncConnectionState::SyncError { .. }
)
}
pub(crate) fn sync_space_name_for(&self, space_id: &SpaceId) -> Option<String> {
self.spaces
.iter()