Skip to content

Conversation

@stephencelis
Copy link
Member

This cleans things up in a similar fashion from pointfreeco/composable-core-location#11 and pointfreeco/composable-core-location#12.

isDeviceMotionAvailable: { manager.isDeviceMotionAvailable },
startDeviceMotionUpdates: { queue in
Effect.run { subscriber in
manager.startDeviceMotionUpdates(to: queue) { data, error in
Copy link
Member Author

Choose a reason for hiding this comment

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

  • Test if this can be called more than once.

if let data = data {
subscriber.send(.init(data))
} else if let error = error {
subscriber.send(completion: .failure(error))
Copy link
Member Author

Choose a reason for hiding this comment

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

  • Are errors terminal? Should we bundle this into a Result?

Base automatically changed from remove-ifdefs to main September 2, 2021 17:02
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.

2 participants