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

Use last known location if GPS fails to sync #752

Merged
merged 8 commits into from
Oct 10, 2020

Conversation

HaramanJohal
Copy link
Contributor

There's a few things I'm not yet sure about so I'm happy to discuss and make corrections here

  1. How do I check that my functionality is working? At the moment when using the expo app it seems not to remember the last known location but I'm not sure if that's just because it is starting from scratch every time I load it
  2. Is this a reasonable way to implement the functionality?

Closes: #727

@CLAassistant
Copy link

CLAassistant commented Oct 2, 2020

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

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

Thanks a lot, this looks like a great start!

I added some comments on how to better fit the fp-ts model this project is using, would recommend to look at their docs too! https://gcanti.github.io/fp-ts/

About how to test, I would recommend to:

  • remove the Location permission from the Expo app
  • when the app launches, deny the location permission
  • the piece of code you're modifying will then be called (you can put some console.logs while debugging)

App/stores/location.tsx Outdated Show resolved Hide resolved
App/stores/location.tsx Outdated Show resolved Hide resolved
App/stores/location.tsx Outdated Show resolved Hide resolved
@HaramanJohal
Copy link
Contributor Author

I took your suggestions to make some changes and on my phone the functionality seems to behave as expected. Happy to make further adjustments

Copy link
Member

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

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

This looks good at 1st glance! I'll also test on my phone.

App/stores/location.tsx Outdated Show resolved Hide resolved
App/stores/location.tsx Show resolved Hide resolved
@amaury1093
Copy link
Member

amaury1093 commented Oct 7, 2020

Hey! Could you merge master into your branch? I believe the failing test is related to that.

git pull origin master should do, assuming origin is set to this repo.

Otherwise, I tested on my phone, it works well! Great job!

@amaury1093 amaury1093 merged commit f0a1716 into shootismoke:master Oct 10, 2020
@amaury1093
Copy link
Member

Thanks again, @HaramanJohal!

@HaramanJohal
Copy link
Contributor Author

No problem @amaurymartiny thanks for teaching me something about functional typescript

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.

Remember location
3 participants