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

Make stopSync more aware of background usage. #3501

Merged
merged 1 commit into from
Nov 11, 2024
Merged

Conversation

pixlwave
Copy link
Member

@pixlwave pixlwave commented Nov 11, 2024

We still had a bug where a successful background task was being run in the foreground. So this PR makes stopSync a bit more aware about whether it's being called from a backround task or not.

(#3478)

@pixlwave pixlwave added the pr-bugfix for bug fix label Nov 11, 2024
@pixlwave pixlwave requested a review from a team as a code owner November 11, 2024 09:48
@pixlwave pixlwave requested review from stefanceriu and removed request for a team November 11, 2024 09:48
@@ -930,7 +934,7 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
backgroundTask = appMediator.beginBackgroundTask { [weak self] in
guard let self else { return }

stopSync()
stopSync(isBackgroundTask: true)
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think this one is strictly needed, but doesn't hurt.

Copy link
Member

@stefanceriu stefanceriu left a comment

Choose a reason for hiding this comment

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

Makes sense to me 👍

Copy link

Warnings
⚠️ Some of the commits are missing ticket numbers. Please consider squashing all commits that don't have a tracking number.

Generated by 🚫 Danger Swift against 42da81c

Copy link

sonarcloud bot commented Nov 11, 2024

Copy link

codecov bot commented Nov 11, 2024

Codecov Report

Attention: Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.

Project coverage is 78.71%. Comparing base (c9aeebc) to head (42da81c).
Report is 3 commits behind head on develop.

Files with missing lines Patch % Lines
ElementX/Sources/Application/AppCoordinator.swift 0.00% 11 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3501      +/-   ##
===========================================
- Coverage    78.71%   78.71%   -0.01%     
===========================================
  Files          743      743              
  Lines        61906    61907       +1     
===========================================
  Hits         48729    48729              
- Misses       13177    13178       +1     
Flag Coverage Δ
unittests 69.45% <0.00%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pixlwave pixlwave merged commit 468afd8 into develop Nov 11, 2024
13 checks passed
@pixlwave pixlwave deleted the doug/sync-loop-fix branch November 11, 2024 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-bugfix for bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants