Skip to content

Conversation

@kaustuvpokharel
Copy link
Collaborator

@kaustuvpokharel kaustuvpokharel commented Dec 12, 2025

This change adds a small push-deferral mechanism in QFieldCloudConnection: when a project push is requested while the device is offline (or reachability is not confirmed), the project ID is queued and the push is automatically retried once the device becomes reachable again.

  • Uses QNetworkInformation::Reachability to detect online/offline transitions (reachabilityChanged)
  • Adds queueProjectPush(), and tryFlushQueuedProjectPushes() in QFieldCloudConnection
  • Queues project IDs (deduped via QSet) and flushes them only when LoggedIn + reachable
  • Emits queuedProjectPush(projectId) when flushing; QFieldCloudProjectsModel listens and calls projectPush(projectId, /shouldDownloadUpdates=/false)
  • Keeps behavior unchanged when no reachability backend is available (treats as “online” / no deferral)
trim.B5710F20-5268-4E78-8300-522A412331F3.MOV

…push the changes as soon as the network is available
@qfield-fairy
Copy link
Collaborator

qfield-fairy commented Dec 12, 2025

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@qfield-fairy
Copy link
Collaborator

qfield-fairy commented Dec 16, 2025

🍎 MacOS DMG universal builds

Download a MacOS DMG universal build of this PR for testing.
(Built from commit 3d0eabb)

🐧 Linux AppImage builds

Download a Linux AppImage build of this PR for testing.
(Built from commit 3d0eabb)

🪟 Windows builds

Download a Windows build of this PR for testing.
(Built from commit 3d0eabb)

@kaustuvpokharel kaustuvpokharel force-pushed the feature/internetAvailabilityCheckedPushproject branch from 3843a42 to 1fe9d6e Compare December 30, 2025 01:21
@kaustuvpokharel kaustuvpokharel merged commit d86f4f8 into master Jan 6, 2026
78 of 114 checks passed
@kaustuvpokharel kaustuvpokharel deleted the feature/internetAvailabilityCheckedPushproject branch January 6, 2026 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants