{"action":"created","comment":{"url":"https://api.github.com/repos/Brewskey/Brewskey.App/pulls/comments/150703641","pull_request_review_id":76293328,"id":150703641,"diff_hunk":"@@ -0,0 +1,65 @@\n+// @flow\n+\n+import type RootStore from './RootStore';\n+import type { ObservableMap } from 'mobx';\n+import type { NearbyLocation } from '../types';\n+\n+import { action, computed, observable, runInAction } from 'mobx';\n+import CommonApi from '../CommonApi';\n+\n+class NearbyLocationsStore {\n+  _rootStore: RootStore;\n+  @observable _nearbyLocationsById: ObservableMap<NearbyLocation> = new Map();\n+\n+  constructor(rootStore: RootStore) {\n+    this._rootStore = rootStore;\n+  }\n+\n+  @action\n+  fetchAll = async (): Promise<Array<NearbyLocation>> => {\n+    try {\n+      const coordinates = await new Promise(\n+        (resolve, reject: (error: PositionError) => void) =>\n+          // eslint-disable-next-line no-undef\n+          navigator.geolocation.getCurrentPosition(\n+            (position: Position): void =>\n+              resolve({\n+                latitude: position.coords.latitude,\n+                longitude: position.coords.longitude,\n+              }),\n+            (error: PositionError) => reject(error),\n+          ),\n+      );\n+\n+      const nearbyLocations = await CommonApi.fetchNearbyLocations(coordinates);\n+\n+      runInAction(() => {\n+        this._nearbyLocationsById.merge([\n+          ...nearbyLocations.map((nearbyLocation: NearbyLocation): [\n+            string,\n+            NearbyLocation,\n+          ] => [nearbyLocation.id, nearbyLocation]),\n+        ]);\n+      });\n+\n+      return nearbyLocations;\n+    } catch (error) {\n+      // todo add error handling\n+      return [];\n+    }\n+  };\n+\n+  @computed\n+  get all(): Array<NearbyLocation> {\n+    return this._nearbyLocationsById.values();\n+  }\n+\n+  @computed\n+  get allWithFilledTaps(): Array<NearbyLocation> {","path":"src/stores/NearbyLocationsStore.js","position":58,"original_position":58,"commit_id":"146577d8038b22e3d31c290abc4f13165a23e0a5","original_commit_id":"146577d8038b22e3d31c290abc4f13165a23e0a5","user":{"login":"AntonPuko","id":8849922,"avatar_url":"https://avatars1.githubusercontent.com/u/8849922?v=4","gravatar_id":"","url":"https://api.github.com/users/AntonPuko","html_url":"https://github.com/AntonPuko","followers_url":"https://api.github.com/users/AntonPuko/followers","following_url":"https://api.github.com/users/AntonPuko/following{/other_user}","gists_url":"https://api.github.com/users/AntonPuko/gists{/gist_id}","starred_url":"https://api.github.com/users/AntonPuko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AntonPuko/subscriptions","organizations_url":"https://api.github.com/users/AntonPuko/orgs","repos_url":"https://api.github.com/users/AntonPuko/repos","events_url":"https://api.github.com/users/AntonPuko/events{/privacy}","received_events_url":"https://api.github.com/users/AntonPuko/received_events","type":"User","site_admin":false},"body":"not sure about the name","created_at":"2017-11-14T00:08:07Z","updated_at":"2017-11-14T00:08:08Z","html_url":"https://github.com/Brewskey/Brewskey.App/pull/60#discussion_r150703641","pull_request_url":"https://api.github.com/repos/Brewskey/Brewskey.App/pulls/60","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Brewskey/Brewskey.App/pulls/comments/150703641"},"html":{"href":"https://github.com/Brewskey/Brewskey.App/pull/60#discussion_r150703641"},"pull_request":{"href":"https://api.github.com/repos/Brewskey/Brewskey.App/pulls/60"}}},"pull_request":{"url":"https://api.github.com/repos/Brewskey/Brewskey.App/pulls/60","id":152381132,"html_url":"https://github.com/Brewskey/Brewskey.App/pull/60","diff_url":"https://github.com/Brewskey/Brewskey.App/pull/60.diff","patch_url":"https://github.com/Brewskey/Brewskey.App/pull/60.patch","issue_url":"https://api.github.com/repos/Brewskey/Brewskey.App/issues/60","number":60,"state":"open","locked":false,"title":"Nearby locations","user":{"login":"AntonPuko","id":8849922,"avatar_url":"https://avatars1.githubusercontent.com/u/8849922?v=4","gravatar_id":"","url":"https://api.github.com/users/AntonPuko","html_url":"https://github.com/AntonPuko","followers_url":"https://api.github.com/users/AntonPuko/followers","following_url":"https://api.github.com/users/AntonPuko/following{/other_user}","gists_url":"https://api.github.com/users/AntonPuko/gists{/gist_id}","starred_url":"https://api.github.com/users/AntonPuko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AntonPuko/subscriptions","organizations_url":"https://api.github.com/users/AntonPuko/orgs","repos_url":"https://api.github.com/users/AntonPuko/repos","events_url":"https://api.github.com/users/AntonPuko/events{/privacy}","received_events_url":"https://api.github.com/users/AntonPuko/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-11-14T00:07:41Z","updated_at":"2017-11-14T00:08:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f47be883104592d7b0d0083009888da8bbd184d2","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Brewskey/Brewskey.App/pulls/60/commits","review_comments_url":"https://api.github.com/repos/Brewskey/Brewskey.App/pulls/60/comments","review_comment_url":"https://api.github.com/repos/Brewskey/Brewskey.App/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Brewskey/Brewskey.App/issues/60/comments","statuses_url":"https://api.github.com/repos/Brewskey/Brewskey.App/statuses/146577d8038b22e3d31c290abc4f13165a23e0a5","head":{"label":"AntonPuko:nearbyLocations","ref":"nearbyLocations","sha":"146577d8038b22e3d31c290abc4f13165a23e0a5","user":{"login":"AntonPuko","id":8849922,"avatar_url":"https://avatars1.githubusercontent.com/u/8849922?v=4","gravatar_id":"","url":"https://api.github.com/users/AntonPuko","html_url":"https://github.com/AntonPuko","followers_url":"https://api.github.com/users/AntonPuko/followers","following_url":"https://api.github.com/users/AntonPuko/following{/other_user}","gists_url":"https://api.github.com/users/AntonPuko/gists{/gist_id}","starred_url":"https://api.github.com/users/AntonPuko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AntonPuko/subscriptions","organizations_url":"https://api.github.com/users/AntonPuko/orgs","repos_url":"https://api.github.com/users/AntonPuko/repos","events_url":"https://api.github.com/users/AntonPuko/events{/privacy}","received_events_url":"https://api.github.com/users/AntonPuko/received_events","type":"User","site_admin":false},"repo":{"id":88798838,"name":"Brewskey.App","full_name":"AntonPuko/Brewskey.App","owner":{"login":"AntonPuko","id":8849922,"avatar_url":"https://avatars1.githubusercontent.com/u/8849922?v=4","gravatar_id":"","url":"https://api.github.com/users/AntonPuko","html_url":"https://github.com/AntonPuko","followers_url":"https://api.github.com/users/AntonPuko/followers","following_url":"https://api.github.com/users/AntonPuko/following{/other_user}","gists_url":"https://api.github.com/users/AntonPuko/gists{/gist_id}","starred_url":"https://api.github.com/users/AntonPuko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AntonPuko/subscriptions","organizations_url":"https://api.github.com/users/AntonPuko/orgs","repos_url":"https://api.github.com/users/AntonPuko/repos","events_url":"https://api.github.com/users/AntonPuko/events{/privacy}","received_events_url":"https://api.github.com/users/AntonPuko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AntonPuko/Brewskey.App","description":"Brewskey mobile apps.","fork":true,"url":"https://api.github.com/repos/AntonPuko/Brewskey.App","forks_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/forks","keys_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/teams","hooks_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/hooks","issue_events_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/issues/events{/number}","events_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/events","assignees_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/assignees{/user}","branches_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/branches{/branch}","tags_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/tags","blobs_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/git/refs{/sha}","trees_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/statuses/{sha}","languages_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/languages","stargazers_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/stargazers","contributors_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/contributors","subscribers_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/subscribers","subscription_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/subscription","commits_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/commits{/sha}","git_commits_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/git/commits{/sha}","comments_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/comments{/number}","issue_comment_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/issues/comments{/number}","contents_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/contents/{+path}","compare_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/merges","archive_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/downloads","issues_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/issues{/number}","pulls_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/pulls{/number}","milestones_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/milestones{/number}","notifications_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/labels{/name}","releases_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/releases{/id}","deployments_url":"https://api.github.com/repos/AntonPuko/Brewskey.App/deployments","created_at":"2017-04-19T23:09:19Z","updated_at":"2017-04-19T23:09:26Z","pushed_at":"2017-11-14T00:06:53Z","git_url":"git://github.com/AntonPuko/Brewskey.App.git","ssh_url":"git@github.com:AntonPuko/Brewskey.App.git","clone_url":"https://github.com/AntonPuko/Brewskey.App.git","svn_url":"https://github.com/AntonPuko/Brewskey.App","homepage":"https://brewskey.com","size":98701,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Brewskey:v2","ref":"v2","sha":"87c4c361300676fb5bad84b1a62dda97b8aa0082","user":{"login":"Brewskey","id":20875563,"avatar_url":"https://avatars0.githubusercontent.com/u/20875563?v=4","gravatar_id":"","url":"https://api.github.com/users/Brewskey","html_url":"https://github.com/Brewskey","followers_url":"https://api.github.com/users/Brewskey/followers","following_url":"https://api.github.com/users/Brewskey/following{/other_user}","gists_url":"https://api.github.com/users/Brewskey/gists{/gist_id}","starred_url":"https://api.github.com/users/Brewskey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Brewskey/subscriptions","organizations_url":"https://api.github.com/users/Brewskey/orgs","repos_url":"https://api.github.com/users/Brewskey/repos","events_url":"https://api.github.com/users/Brewskey/events{/privacy}","received_events_url":"https://api.github.com/users/Brewskey/received_events","type":"Organization","site_admin":false},"repo":{"id":32554951,"name":"Brewskey.App","full_name":"Brewskey/Brewskey.App","owner":{"login":"Brewskey","id":20875563,"avatar_url":"https://avatars0.githubusercontent.com/u/20875563?v=4","gravatar_id":"","url":"https://api.github.com/users/Brewskey","html_url":"https://github.com/Brewskey","followers_url":"https://api.github.com/users/Brewskey/followers","following_url":"https://api.github.com/users/Brewskey/following{/other_user}","gists_url":"https://api.github.com/users/Brewskey/gists{/gist_id}","starred_url":"https://api.github.com/users/Brewskey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Brewskey/subscriptions","organizations_url":"https://api.github.com/users/Brewskey/orgs","repos_url":"https://api.github.com/users/Brewskey/repos","events_url":"https://api.github.com/users/Brewskey/events{/privacy}","received_events_url":"https://api.github.com/users/Brewskey/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Brewskey/Brewskey.App","description":"Brewskey mobile apps.","fork":false,"url":"https://api.github.com/repos/Brewskey/Brewskey.App","forks_url":"https://api.github.com/repos/Brewskey/Brewskey.App/forks","keys_url":"https://api.github.com/repos/Brewskey/Brewskey.App/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Brewskey/Brewskey.App/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Brewskey/Brewskey.App/teams","hooks_url":"https://api.github.com/repos/Brewskey/Brewskey.App/hooks","issue_events_url":"https://api.github.com/repos/Brewskey/Brewskey.App/issues/events{/number}","events_url":"https://api.github.com/repos/Brewskey/Brewskey.App/events","assignees_url":"https://api.github.com/repos/Brewskey/Brewskey.App/assignees{/user}","branches_url":"https://api.github.com/repos/Brewskey/Brewskey.App/branches{/branch}","tags_url":"https://api.github.com/repos/Brewskey/Brewskey.App/tags","blobs_url":"https://api.github.com/repos/Brewskey/Brewskey.App/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Brewskey/Brewskey.App/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Brewskey/Brewskey.App/git/refs{/sha}","trees_url":"https://api.github.com/repos/Brewskey/Brewskey.App/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Brewskey/Brewskey.App/statuses/{sha}","languages_url":"https://api.github.com/repos/Brewskey/Brewskey.App/languages","stargazers_url":"https://api.github.com/repos/Brewskey/Brewskey.App/stargazers","contributors_url":"https://api.github.com/repos/Brewskey/Brewskey.App/contributors","subscribers_url":"https://api.github.com/repos/Brewskey/Brewskey.App/subscribers","subscription_url":"https://api.github.com/repos/Brewskey/Brewskey.App/subscription","commits_url":"https://api.github.com/repos/Brewskey/Brewskey.App/commits{/sha}","git_commits_url":"https://api.github.com/repos/Brewskey/Brewskey.App/git/commits{/sha}","comments_url":"https://api.github.com/repos/Brewskey/Brewskey.App/comments{/number}","issue_comment_url":"https://api.github.com/repos/Brewskey/Brewskey.App/issues/comments{/number}","contents_url":"https://api.github.com/repos/Brewskey/Brewskey.App/contents/{+path}","compare_url":"https://api.github.com/repos/Brewskey/Brewskey.App/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Brewskey/Brewskey.App/merges","archive_url":"https://api.github.com/repos/Brewskey/Brewskey.App/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Brewskey/Brewskey.App/downloads","issues_url":"https://api.github.com/repos/Brewskey/Brewskey.App/issues{/number}","pulls_url":"https://api.github.com/repos/Brewskey/Brewskey.App/pulls{/number}","milestones_url":"https://api.github.com/repos/Brewskey/Brewskey.App/milestones{/number}","notifications_url":"https://api.github.com/repos/Brewskey/Brewskey.App/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Brewskey/Brewskey.App/labels{/name}","releases_url":"https://api.github.com/repos/Brewskey/Brewskey.App/releases{/id}","deployments_url":"https://api.github.com/repos/Brewskey/Brewskey.App/deployments","created_at":"2015-03-20T01:06:50Z","updated_at":"2017-10-05T01:15:37Z","pushed_at":"2017-11-14T00:07:41Z","git_url":"git://github.com/Brewskey/Brewskey.App.git","ssh_url":"git@github.com:Brewskey/Brewskey.App.git","clone_url":"https://github.com/Brewskey/Brewskey.App.git","svn_url":"https://github.com/Brewskey/Brewskey.App","homepage":"https://brewskey.com","size":98697,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":18,"forks":1,"open_issues":18,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Brewskey/Brewskey.App/pulls/60"},"html":{"href":"https://github.com/Brewskey/Brewskey.App/pull/60"},"issue":{"href":"https://api.github.com/repos/Brewskey/Brewskey.App/issues/60"},"comments":{"href":"https://api.github.com/repos/Brewskey/Brewskey.App/issues/60/comments"},"review_comments":{"href":"https://api.github.com/repos/Brewskey/Brewskey.App/pulls/60/comments"},"review_comment":{"href":"https://api.github.com/repos/Brewskey/Brewskey.App/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Brewskey/Brewskey.App/pulls/60/commits"},"statuses":{"href":"https://api.github.com/repos/Brewskey/Brewskey.App/statuses/146577d8038b22e3d31c290abc4f13165a23e0a5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"AntonPuko"}}