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

DeviceStateAccessor: fix incorrect initial parameter propagation; restore ability to connect to devices #53

Merged
merged 2 commits into from
Nov 23, 2024

Conversation

lukaskollmer
Copy link
Member

♻️ Current situation & Problem

Trying to connect (via SpeziDevices) to a peripheral doesn't work because the nearby.onChange state observer is sent an initial false value, which causes the peripheral to immediately get discarded after being discovered.

⚙️ Release Notes

  • Fix issue that could prevent peripheral connection establishment

📚 Documentation

n/a

✅ Testing

n/a

📝 Code of Conduct & Contributing Guidelines

By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:


Note: this PR supersedes #52 (the difference being that this one is made from an repo-internal branch, which @PSchmiedmayer said was required for some of the actions to properly run)

Copy link

codecov bot commented Nov 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.63%. Comparing base (4d64dfa) to head (dfe0618).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #53      +/-   ##
==========================================
+ Coverage   80.16%   80.63%   +0.47%     
==========================================
  Files         111      111              
  Lines        6053     6053              
==========================================
+ Hits         4852     4880      +28     
+ Misses       1201     1173      -28     
Files with missing lines Coverage Δ
...th/Model/PropertySupport/DeviceStateAccessor.swift 59.02% <100.00%> (ø)
.../SpeziBluetooth/Modifier/AutoConnectModifier.swift 0.00% <ø> (ø)
...Bluetooth/Modifier/ScanNearbyDevicesModifier.swift 71.12% <ø> (ø)

... and 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4d64dfa...dfe0618. Read the comment docs.

---- 🚨 Try these New Features:

Copy link
Member

@PSchmiedmayer PSchmiedmayer left a comment

Choose a reason for hiding this comment

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

Thank you for the fix @lukaskollmer!

There are some unrelated SwiftLint errors that might come from an SwiftLint update, it would be amazing if you can also fix then and merge the PR after that, thank you!

@lukaskollmer lukaskollmer merged commit 22e7dcf into main Nov 23, 2024
9 checks passed
@lukaskollmer lukaskollmer deleted the lukas/fix-onChange branch November 23, 2024 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants