Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to pause synchronization on metered connections #11305

Merged
merged 3 commits into from
Jan 5, 2024

Conversation

erikjv
Copy link
Collaborator

@erikjv erikjv commented Oct 23, 2023

No description provided.

@erikjv erikjv self-assigned this Oct 23, 2023
@erikjv erikjv marked this pull request as draft October 23, 2023 13:26
@erikjv erikjv linked an issue Oct 27, 2023 that may be closed by this pull request
@erikjv erikjv force-pushed the work/pause-sync-when-metered branch 2 times, most recently from d50b1a4 to d06a6f8 Compare November 2, 2023 17:17
@erikjv
Copy link
Collaborator Author

erikjv commented Nov 2, 2023

To test on Windows:

Make sure the "Pause..." checkbox is checked (note: since the screenshot was made, the checkbox has been moved to the top of the network settings):

Screenshot 2023-11-02 at 18 22 43

Check that the account is connected:

Screenshot 2023-11-02 at 18 23 33

Go to the windows network adapter settings by opening the "Settings" app, then choose "Network & Internet", and click the "Properties" button. This should have a switch to turn the connection to metered:

Screenshot 2023-11-02 at 18 25 37

Toggling the switch will change the status of the client to indicate it's paused:

Screenshot 2023-11-02 at 18 26 22

Toggling the switch back should go to the connected state.

@erikjv erikjv requested review from TheOneRing and fmoc November 2, 2023 18:14
@erikjv erikjv marked this pull request as ready for review November 2, 2023 18:14
Copy link

sonarqubecloud bot commented Nov 2, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 10 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@erikjv erikjv force-pushed the work/pause-sync-when-metered branch from d06a6f8 to 2afff7b Compare November 9, 2023 15:51
src/gui/accountsettings.cpp Outdated Show resolved Hide resolved
src/gui/main.cpp Show resolved Hide resolved
src/gui/accountsettings.cpp Outdated Show resolved Hide resolved
src/gui/accountstate.cpp Show resolved Hide resolved
src/gui/networksettings.cpp Show resolved Hide resolved
@erikjv erikjv force-pushed the work/pause-sync-when-metered branch 2 times, most recently from eb19eee to 1614f19 Compare December 14, 2023 15:35
@erikjv erikjv requested a review from TheOneRing December 14, 2023 15:38
@TheOneRing TheOneRing changed the title Work/pause sync when metered Add option to pause synchronization on metered connections Dec 19, 2023
Copy link
Contributor

@TheOneRing TheOneRing left a comment

Choose a reason for hiding this comment

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

Please add a changelog entry

src/gui/accountsettings.cpp Show resolved Hide resolved
src/gui/accountsettings.cpp Show resolved Hide resolved
src/gui/folder.cpp Outdated Show resolved Hide resolved
src/gui/folder.h Outdated Show resolved Hide resolved
@erikjv erikjv force-pushed the work/pause-sync-when-metered branch 2 times, most recently from 06188e1 to 5e453ff Compare January 3, 2024 15:34
@erikjv erikjv requested a review from TheOneRing January 3, 2024 15:34
TheOneRing
TheOneRing previously approved these changes Jan 4, 2024
@TheOneRing
Copy link
Contributor

Please fix the changelog:

file changelog/unreleased/4808: primary issue ID not found

erikjv added 3 commits January 4, 2024 17:00
The `QNetworkInformation` will be used in multiple places. Do the
loading once before any uses.
Add an advanced configuration setting to pause synchronization when a
metered internet connection is detected.

When the internet connection is metered, and the user chooses to
force-sync a folder, they will now be asked if they are sure that they
want to do this.

Fixes: #4808
@erikjv erikjv force-pushed the work/pause-sync-when-metered branch from 612e416 to bbfb8fe Compare January 5, 2024 13:21
@TheOneRing TheOneRing merged commit 11bddfd into master Jan 5, 2024
7 checks passed
@delete-merged-branch delete-merged-branch bot deleted the work/pause-sync-when-metered branch January 5, 2024 14:34
@saw-jan
Copy link
Member

saw-jan commented Jan 8, 2024

Tested: #4808 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't sync when device is on cellular/mobile connection
3 participants