{"action":"created","comment":{"url":"https://api.github.com/repos/basbeu/theSofties/pulls/comments/225691511","pull_request_review_id":165346719,"id":225691511,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNTY5MTUxMQ==","diff_hunk":"@@ -4,27 +4,46 @@\n \n public class User extends DatabaseHandler {\n     private static final String COLLECTION = \"users\";\n+    private FirebaseAuth instance;\n \n     private static User user = new User();\n     public static User getMain(){\n         return user;\n     }\n \n+    public FirebaseAuth getInstance() {\n+        return instance;\n+    }\n+\n     public static void setMain(String id){\n         user = new User(id);\n     }\n+    public static void setMain(User u) {user = u; }\n \n     public enum StringFields implements DatabaseStringField{firstName, lastName, email, sex, basedLocation}\n \n     public User(){\n         super(StringFields.values(), COLLECTION,FirebaseAuth.getInstance().getUid());\n-        if(FirebaseAuth.getInstance().getUid() != null)\n+        instance = FirebaseAuth.getInstance();\n+        if(instance.getUid() != null){\n             updateFromDb();\n+        }\n+\n     }\n \n     public User(String id){\n         super(StringFields.values(), COLLECTION,id);\n-        if(FirebaseAuth.getInstance().getUid() != null)\n+        instance = FirebaseAuth.getInstance();\n+        if(instance.getUid() != null) {\n+            updateFromDb();\n+        }\n+    }\n+\n+    public User(FirebaseAuth instance){\n+        super(StringFields.values(), COLLECTION,instance.getUid());\n+        this.instance = instance;\n+        if(instance.getUid() != null) {\n             updateFromDb();\n+        }","path":"app/src/main/java/ch/epfl/sweng/favors/database/User.java","position":46,"original_position":46,"commit_id":"762fe518df8a1c5de061dc4ae5a52d8c0f8329bc","original_commit_id":"762fe518df8a1c5de061dc4ae5a52d8c0f8329bc","user":{"login":"Jmion","id":15061803,"node_id":"MDQ6VXNlcjE1MDYxODAz","avatar_url":"https://avatars2.githubusercontent.com/u/15061803?v=4","gravatar_id":"","url":"https://api.github.com/users/Jmion","html_url":"https://github.com/Jmion","followers_url":"https://api.github.com/users/Jmion/followers","following_url":"https://api.github.com/users/Jmion/following{/other_user}","gists_url":"https://api.github.com/users/Jmion/gists{/gist_id}","starred_url":"https://api.github.com/users/Jmion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jmion/subscriptions","organizations_url":"https://api.github.com/users/Jmion/orgs","repos_url":"https://api.github.com/users/Jmion/repos","events_url":"https://api.github.com/users/Jmion/events{/privacy}","received_events_url":"https://api.github.com/users/Jmion/received_events","type":"User","site_admin":false},"body":"Ok. You can tell me tomorrow why you did that.","created_at":"2018-10-16T20:12:46Z","updated_at":"2018-10-16T20:12:46Z","html_url":"https://github.com/basbeu/theSofties/pull/160#discussion_r225691511","pull_request_url":"https://api.github.com/repos/basbeu/theSofties/pulls/160","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/basbeu/theSofties/pulls/comments/225691511"},"html":{"href":"https://github.com/basbeu/theSofties/pull/160#discussion_r225691511"},"pull_request":{"href":"https://api.github.com/repos/basbeu/theSofties/pulls/160"}},"in_reply_to_id":225688847},"pull_request":{"url":"https://api.github.com/repos/basbeu/theSofties/pulls/160","id":223338948,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIzMzM4OTQ4","html_url":"https://github.com/basbeu/theSofties/pull/160","diff_url":"https://github.com/basbeu/theSofties/pull/160.diff","patch_url":"https://github.com/basbeu/theSofties/pull/160.patch","issue_url":"https://api.github.com/repos/basbeu/theSofties/issues/160","number":160,"state":"open","locked":false,"title":"F unit tests","user":{"login":"AndreaScalisi","id":26004056,"node_id":"MDQ6VXNlcjI2MDA0MDU2","avatar_url":"https://avatars1.githubusercontent.com/u/26004056?v=4","gravatar_id":"","url":"https://api.github.com/users/AndreaScalisi","html_url":"https://github.com/AndreaScalisi","followers_url":"https://api.github.com/users/AndreaScalisi/followers","following_url":"https://api.github.com/users/AndreaScalisi/following{/other_user}","gists_url":"https://api.github.com/users/AndreaScalisi/gists{/gist_id}","starred_url":"https://api.github.com/users/AndreaScalisi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndreaScalisi/subscriptions","organizations_url":"https://api.github.com/users/AndreaScalisi/orgs","repos_url":"https://api.github.com/users/AndreaScalisi/repos","events_url":"https://api.github.com/users/AndreaScalisi/events{/privacy}","received_events_url":"https://api.github.com/users/AndreaScalisi/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-10-16T17:44:29Z","updated_at":"2018-10-16T20:12:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"118747c96b26d0492bd8fa0c2f59aa360f35dc8a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/basbeu/theSofties/pulls/160/commits","review_comments_url":"https://api.github.com/repos/basbeu/theSofties/pulls/160/comments","review_comment_url":"https://api.github.com/repos/basbeu/theSofties/pulls/comments{/number}","comments_url":"https://api.github.com/repos/basbeu/theSofties/issues/160/comments","statuses_url":"https://api.github.com/repos/basbeu/theSofties/statuses/762fe518df8a1c5de061dc4ae5a52d8c0f8329bc","head":{"label":"basbeu:f-unitTests","ref":"f-unitTests","sha":"762fe518df8a1c5de061dc4ae5a52d8c0f8329bc","user":{"login":"basbeu","id":26392804,"node_id":"MDQ6VXNlcjI2MzkyODA0","avatar_url":"https://avatars2.githubusercontent.com/u/26392804?v=4","gravatar_id":"","url":"https://api.github.com/users/basbeu","html_url":"https://github.com/basbeu","followers_url":"https://api.github.com/users/basbeu/followers","following_url":"https://api.github.com/users/basbeu/following{/other_user}","gists_url":"https://api.github.com/users/basbeu/gists{/gist_id}","starred_url":"https://api.github.com/users/basbeu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basbeu/subscriptions","organizations_url":"https://api.github.com/users/basbeu/orgs","repos_url":"https://api.github.com/users/basbeu/repos","events_url":"https://api.github.com/users/basbeu/events{/privacy}","received_events_url":"https://api.github.com/users/basbeu/received_events","type":"User","site_admin":false},"repo":{"id":150413575,"node_id":"MDEwOlJlcG9zaXRvcnkxNTA0MTM1NzU=","name":"theSofties","full_name":"basbeu/theSofties","private":false,"owner":{"login":"basbeu","id":26392804,"node_id":"MDQ6VXNlcjI2MzkyODA0","avatar_url":"https://avatars2.githubusercontent.com/u/26392804?v=4","gravatar_id":"","url":"https://api.github.com/users/basbeu","html_url":"https://github.com/basbeu","followers_url":"https://api.github.com/users/basbeu/followers","following_url":"https://api.github.com/users/basbeu/following{/other_user}","gists_url":"https://api.github.com/users/basbeu/gists{/gist_id}","starred_url":"https://api.github.com/users/basbeu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basbeu/subscriptions","organizations_url":"https://api.github.com/users/basbeu/orgs","repos_url":"https://api.github.com/users/basbeu/repos","events_url":"https://api.github.com/users/basbeu/events{/privacy}","received_events_url":"https://api.github.com/users/basbeu/received_events","type":"User","site_admin":false},"html_url":"https://github.com/basbeu/theSofties","description":null,"fork":false,"url":"https://api.github.com/repos/basbeu/theSofties","forks_url":"https://api.github.com/repos/basbeu/theSofties/forks","keys_url":"https://api.github.com/repos/basbeu/theSofties/keys{/key_id}","collaborators_url":"https://api.github.com/repos/basbeu/theSofties/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/basbeu/theSofties/teams","hooks_url":"https://api.github.com/repos/basbeu/theSofties/hooks","issue_events_url":"https://api.github.com/repos/basbeu/theSofties/issues/events{/number}","events_url":"https://api.github.com/repos/basbeu/theSofties/events","assignees_url":"https://api.github.com/repos/basbeu/theSofties/assignees{/user}","branches_url":"https://api.github.com/repos/basbeu/theSofties/branches{/branch}","tags_url":"https://api.github.com/repos/basbeu/theSofties/tags","blobs_url":"https://api.github.com/repos/basbeu/theSofties/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/basbeu/theSofties/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/basbeu/theSofties/git/refs{/sha}","trees_url":"https://api.github.com/repos/basbeu/theSofties/git/trees{/sha}","statuses_url":"https://api.github.com/repos/basbeu/theSofties/statuses/{sha}","languages_url":"https://api.github.com/repos/basbeu/theSofties/languages","stargazers_url":"https://api.github.com/repos/basbeu/theSofties/stargazers","contributors_url":"https://api.github.com/repos/basbeu/theSofties/contributors","subscribers_url":"https://api.github.com/repos/basbeu/theSofties/subscribers","subscription_url":"https://api.github.com/repos/basbeu/theSofties/subscription","commits_url":"https://api.github.com/repos/basbeu/theSofties/commits{/sha}","git_commits_url":"https://api.github.com/repos/basbeu/theSofties/git/commits{/sha}","comments_url":"https://api.github.com/repos/basbeu/theSofties/comments{/number}","issue_comment_url":"https://api.github.com/repos/basbeu/theSofties/issues/comments{/number}","contents_url":"https://api.github.com/repos/basbeu/theSofties/contents/{+path}","compare_url":"https://api.github.com/repos/basbeu/theSofties/compare/{base}...{head}","merges_url":"https://api.github.com/repos/basbeu/theSofties/merges","archive_url":"https://api.github.com/repos/basbeu/theSofties/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/basbeu/theSofties/downloads","issues_url":"https://api.github.com/repos/basbeu/theSofties/issues{/number}","pulls_url":"https://api.github.com/repos/basbeu/theSofties/pulls{/number}","milestones_url":"https://api.github.com/repos/basbeu/theSofties/milestones{/number}","notifications_url":"https://api.github.com/repos/basbeu/theSofties/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/basbeu/theSofties/labels{/name}","releases_url":"https://api.github.com/repos/basbeu/theSofties/releases{/id}","deployments_url":"https://api.github.com/repos/basbeu/theSofties/deployments","created_at":"2018-09-26T11:07:43Z","updated_at":"2018-10-15T00:37:35Z","pushed_at":"2018-10-16T18:51:23Z","git_url":"git://github.com/basbeu/theSofties.git","ssh_url":"git@github.com:basbeu/theSofties.git","clone_url":"https://github.com/basbeu/theSofties.git","svn_url":"https://github.com/basbeu/theSofties","homepage":null,"size":75619,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":62,"license":null,"forks":0,"open_issues":62,"watchers":0,"default_branch":"master"}},"base":{"label":"basbeu:release","ref":"release","sha":"b6c2d14058f3b57f09e4508aa1d71c2853be5c9b","user":{"login":"basbeu","id":26392804,"node_id":"MDQ6VXNlcjI2MzkyODA0","avatar_url":"https://avatars2.githubusercontent.com/u/26392804?v=4","gravatar_id":"","url":"https://api.github.com/users/basbeu","html_url":"https://github.com/basbeu","followers_url":"https://api.github.com/users/basbeu/followers","following_url":"https://api.github.com/users/basbeu/following{/other_user}","gists_url":"https://api.github.com/users/basbeu/gists{/gist_id}","starred_url":"https://api.github.com/users/basbeu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basbeu/subscriptions","organizations_url":"https://api.github.com/users/basbeu/orgs","repos_url":"https://api.github.com/users/basbeu/repos","events_url":"https://api.github.com/users/basbeu/events{/privacy}","received_events_url":"https://api.github.com/users/basbeu/received_events","type":"User","site_admin":false},"repo":{"id":150413575,"node_id":"MDEwOlJlcG9zaXRvcnkxNTA0MTM1NzU=","name":"theSofties","full_name":"basbeu/theSofties","private":false,"owner":{"login":"basbeu","id":26392804,"node_id":"MDQ6VXNlcjI2MzkyODA0","avatar_url":"https://avatars2.githubusercontent.com/u/26392804?v=4","gravatar_id":"","url":"https://api.github.com/users/basbeu","html_url":"https://github.com/basbeu","followers_url":"https://api.github.com/users/basbeu/followers","following_url":"https://api.github.com/users/basbeu/following{/other_user}","gists_url":"https://api.github.com/users/basbeu/gists{/gist_id}","starred_url":"https://api.github.com/users/basbeu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basbeu/subscriptions","organizations_url":"https://api.github.com/users/basbeu/orgs","repos_url":"https://api.github.com/users/basbeu/repos","events_url":"https://api.github.com/users/basbeu/events{/privacy}","received_events_url":"https://api.github.com/users/basbeu/received_events","type":"User","site_admin":false},"html_url":"https://github.com/basbeu/theSofties","description":null,"fork":false,"url":"https://api.github.com/repos/basbeu/theSofties","forks_url":"https://api.github.com/repos/basbeu/theSofties/forks","keys_url":"https://api.github.com/repos/basbeu/theSofties/keys{/key_id}","collaborators_url":"https://api.github.com/repos/basbeu/theSofties/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/basbeu/theSofties/teams","hooks_url":"https://api.github.com/repos/basbeu/theSofties/hooks","issue_events_url":"https://api.github.com/repos/basbeu/theSofties/issues/events{/number}","events_url":"https://api.github.com/repos/basbeu/theSofties/events","assignees_url":"https://api.github.com/repos/basbeu/theSofties/assignees{/user}","branches_url":"https://api.github.com/repos/basbeu/theSofties/branches{/branch}","tags_url":"https://api.github.com/repos/basbeu/theSofties/tags","blobs_url":"https://api.github.com/repos/basbeu/theSofties/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/basbeu/theSofties/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/basbeu/theSofties/git/refs{/sha}","trees_url":"https://api.github.com/repos/basbeu/theSofties/git/trees{/sha}","statuses_url":"https://api.github.com/repos/basbeu/theSofties/statuses/{sha}","languages_url":"https://api.github.com/repos/basbeu/theSofties/languages","stargazers_url":"https://api.github.com/repos/basbeu/theSofties/stargazers","contributors_url":"https://api.github.com/repos/basbeu/theSofties/contributors","subscribers_url":"https://api.github.com/repos/basbeu/theSofties/subscribers","subscription_url":"https://api.github.com/repos/basbeu/theSofties/subscription","commits_url":"https://api.github.com/repos/basbeu/theSofties/commits{/sha}","git_commits_url":"https://api.github.com/repos/basbeu/theSofties/git/commits{/sha}","comments_url":"https://api.github.com/repos/basbeu/theSofties/comments{/number}","issue_comment_url":"https://api.github.com/repos/basbeu/theSofties/issues/comments{/number}","contents_url":"https://api.github.com/repos/basbeu/theSofties/contents/{+path}","compare_url":"https://api.github.com/repos/basbeu/theSofties/compare/{base}...{head}","merges_url":"https://api.github.com/repos/basbeu/theSofties/merges","archive_url":"https://api.github.com/repos/basbeu/theSofties/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/basbeu/theSofties/downloads","issues_url":"https://api.github.com/repos/basbeu/theSofties/issues{/number}","pulls_url":"https://api.github.com/repos/basbeu/theSofties/pulls{/number}","milestones_url":"https://api.github.com/repos/basbeu/theSofties/milestones{/number}","notifications_url":"https://api.github.com/repos/basbeu/theSofties/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/basbeu/theSofties/labels{/name}","releases_url":"https://api.github.com/repos/basbeu/theSofties/releases{/id}","deployments_url":"https://api.github.com/repos/basbeu/theSofties/deployments","created_at":"2018-09-26T11:07:43Z","updated_at":"2018-10-15T00:37:35Z","pushed_at":"2018-10-16T18:51:23Z","git_url":"git://github.com/basbeu/theSofties.git","ssh_url":"git@github.com:basbeu/theSofties.git","clone_url":"https://github.com/basbeu/theSofties.git","svn_url":"https://github.com/basbeu/theSofties","homepage":null,"size":75619,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":62,"license":null,"forks":0,"open_issues":62,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/basbeu/theSofties/pulls/160"},"html":{"href":"https://github.com/basbeu/theSofties/pull/160"},"issue":{"href":"https://api.github.com/repos/basbeu/theSofties/issues/160"},"comments":{"href":"https://api.github.com/repos/basbeu/theSofties/issues/160/comments"},"review_comments":{"href":"https://api.github.com/repos/basbeu/theSofties/pulls/160/comments"},"review_comment":{"href":"https://api.github.com/repos/basbeu/theSofties/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/basbeu/theSofties/pulls/160/commits"},"statuses":{"href":"https://api.github.com/repos/basbeu/theSofties/statuses/762fe518df8a1c5de061dc4ae5a52d8c0f8329bc"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"Jmion"}}