{"action":"created","comment":{"url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/pulls/comments/204786264","pull_request_review_id":139927652,"id":204786264,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNDc4NjI2NA==","diff_hunk":"@@ -0,0 +1,42 @@\n+package com.leoart.koreanphrasebook.ui.notes\n+\n+import android.arch.lifecycle.LiveData\n+import android.arch.lifecycle.MutableLiveData\n+import android.arch.lifecycle.ViewModel\n+import com.leoart.koreanphrasebook.data.repository.NotesRepository\n+import com.leoart.koreanphrasebook.ui.models.Note\n+import io.reactivex.android.schedulers.AndroidSchedulers\n+import io.reactivex.schedulers.Schedulers\n+\n+class NotesViewModel(val repository: NotesRepository) : ViewModel() {\n+\n+    private val notes: MutableLiveData<List<Note>> by lazy {\n+        MutableLiveData<List<Note>>()\n+    }\n+\n+    fun notesData(): LiveData<List<Note>> {\n+        if (this.notes.value == null) {\n+            this.notes.value = mutableListOf()\n+        }\n+        return this.notes\n+    }\n+\n+    fun fetchNotes() {\n+        repository.fetchNotes()\n+                .subscribeOn(Schedulers.io())\n+                .observeOn(AndroidSchedulers.mainThread())\n+                .subscribe({ notes ->\n+                    this.notes.value = notes\n+                }, {\n+                    throw UnsupportedOperationException(\"not implemented\")","path":"app/src/main/java/com/leoart/koreanphrasebook/ui/notes/NotesViewModel.kt","position":31,"original_position":31,"commit_id":"169c4ba28d9f75ddb4e7eddb2a5557600586cd65","original_commit_id":"169c4ba28d9f75ddb4e7eddb2a5557600586cd65","user":{"login":"khrystynapochynok","id":15200216,"node_id":"MDQ6VXNlcjE1MjAwMjE2","avatar_url":"https://avatars0.githubusercontent.com/u/15200216?v=4","gravatar_id":"","url":"https://api.github.com/users/khrystynapochynok","html_url":"https://github.com/khrystynapochynok","followers_url":"https://api.github.com/users/khrystynapochynok/followers","following_url":"https://api.github.com/users/khrystynapochynok/following{/other_user}","gists_url":"https://api.github.com/users/khrystynapochynok/gists{/gist_id}","starred_url":"https://api.github.com/users/khrystynapochynok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khrystynapochynok/subscriptions","organizations_url":"https://api.github.com/users/khrystynapochynok/orgs","repos_url":"https://api.github.com/users/khrystynapochynok/repos","events_url":"https://api.github.com/users/khrystynapochynok/events{/privacy}","received_events_url":"https://api.github.com/users/khrystynapochynok/received_events","type":"User","site_admin":false},"body":"@LyubomurBuryi add error handling","created_at":"2018-07-24T14:47:10Z","updated_at":"2018-07-24T14:50:10Z","html_url":"https://github.com/bogdanustyak/KoreanPhraseBook/pull/9#discussion_r204786264","pull_request_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/pulls/9","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/pulls/comments/204786264"},"html":{"href":"https://github.com/bogdanustyak/KoreanPhraseBook/pull/9#discussion_r204786264"},"pull_request":{"href":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/pulls/9","id":203521838,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzNTIxODM4","html_url":"https://github.com/bogdanustyak/KoreanPhraseBook/pull/9","diff_url":"https://github.com/bogdanustyak/KoreanPhraseBook/pull/9.diff","patch_url":"https://github.com/bogdanustyak/KoreanPhraseBook/pull/9.patch","issue_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/issues/9","number":9,"state":"open","locked":false,"title":"Add notes screen","user":{"login":"LyubomurBuryi","id":22652522,"node_id":"MDQ6VXNlcjIyNjUyNTIy","avatar_url":"https://avatars3.githubusercontent.com/u/22652522?v=4","gravatar_id":"","url":"https://api.github.com/users/LyubomurBuryi","html_url":"https://github.com/LyubomurBuryi","followers_url":"https://api.github.com/users/LyubomurBuryi/followers","following_url":"https://api.github.com/users/LyubomurBuryi/following{/other_user}","gists_url":"https://api.github.com/users/LyubomurBuryi/gists{/gist_id}","starred_url":"https://api.github.com/users/LyubomurBuryi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LyubomurBuryi/subscriptions","organizations_url":"https://api.github.com/users/LyubomurBuryi/orgs","repos_url":"https://api.github.com/users/LyubomurBuryi/repos","events_url":"https://api.github.com/users/LyubomurBuryi/events{/privacy}","received_events_url":"https://api.github.com/users/LyubomurBuryi/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-24T13:12:27Z","updated_at":"2018-07-24T14:50:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3527c0fa479594e30e5dceb65f4d9a9b9d734780","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/pulls/9/commits","review_comments_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/pulls/9/comments","review_comment_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/issues/9/comments","statuses_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/statuses/169c4ba28d9f75ddb4e7eddb2a5557600586cd65","head":{"label":"bogdanustyak:feature/KOR-22_add_notes_screen","ref":"feature/KOR-22_add_notes_screen","sha":"169c4ba28d9f75ddb4e7eddb2a5557600586cd65","user":{"login":"bogdanustyak","id":3966368,"node_id":"MDQ6VXNlcjM5NjYzNjg=","avatar_url":"https://avatars0.githubusercontent.com/u/3966368?v=4","gravatar_id":"","url":"https://api.github.com/users/bogdanustyak","html_url":"https://github.com/bogdanustyak","followers_url":"https://api.github.com/users/bogdanustyak/followers","following_url":"https://api.github.com/users/bogdanustyak/following{/other_user}","gists_url":"https://api.github.com/users/bogdanustyak/gists{/gist_id}","starred_url":"https://api.github.com/users/bogdanustyak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bogdanustyak/subscriptions","organizations_url":"https://api.github.com/users/bogdanustyak/orgs","repos_url":"https://api.github.com/users/bogdanustyak/repos","events_url":"https://api.github.com/users/bogdanustyak/events{/privacy}","received_events_url":"https://api.github.com/users/bogdanustyak/received_events","type":"User","site_admin":false},"repo":{"id":74668243,"node_id":"MDEwOlJlcG9zaXRvcnk3NDY2ODI0Mw==","name":"KoreanPhraseBook","full_name":"bogdanustyak/KoreanPhraseBook","owner":{"login":"bogdanustyak","id":3966368,"node_id":"MDQ6VXNlcjM5NjYzNjg=","avatar_url":"https://avatars0.githubusercontent.com/u/3966368?v=4","gravatar_id":"","url":"https://api.github.com/users/bogdanustyak","html_url":"https://github.com/bogdanustyak","followers_url":"https://api.github.com/users/bogdanustyak/followers","following_url":"https://api.github.com/users/bogdanustyak/following{/other_user}","gists_url":"https://api.github.com/users/bogdanustyak/gists{/gist_id}","starred_url":"https://api.github.com/users/bogdanustyak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bogdanustyak/subscriptions","organizations_url":"https://api.github.com/users/bogdanustyak/orgs","repos_url":"https://api.github.com/users/bogdanustyak/repos","events_url":"https://api.github.com/users/bogdanustyak/events{/privacy}","received_events_url":"https://api.github.com/users/bogdanustyak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bogdanustyak/KoreanPhraseBook","description":null,"fork":false,"url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook","forks_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/forks","keys_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/teams","hooks_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/hooks","issue_events_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/issues/events{/number}","events_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/events","assignees_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/assignees{/user}","branches_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/branches{/branch}","tags_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/tags","blobs_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/git/refs{/sha}","trees_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/statuses/{sha}","languages_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/languages","stargazers_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/stargazers","contributors_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/contributors","subscribers_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/subscribers","subscription_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/subscription","commits_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/commits{/sha}","git_commits_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/git/commits{/sha}","comments_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/comments{/number}","issue_comment_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/issues/comments{/number}","contents_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/contents/{+path}","compare_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/merges","archive_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/downloads","issues_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/issues{/number}","pulls_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/pulls{/number}","milestones_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/milestones{/number}","notifications_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/labels{/name}","releases_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/releases{/id}","deployments_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/deployments","created_at":"2016-11-24T11:46:16Z","updated_at":"2016-11-24T11:50:39Z","pushed_at":"2018-07-24T14:41:37Z","git_url":"git://github.com/bogdanustyak/KoreanPhraseBook.git","ssh_url":"git@github.com:bogdanustyak/KoreanPhraseBook.git","clone_url":"https://github.com/bogdanustyak/KoreanPhraseBook.git","svn_url":"https://github.com/bogdanustyak/KoreanPhraseBook","homepage":null,"size":6526,"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":3,"license":null,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"bogdanustyak:develop","ref":"develop","sha":"42929cdaab1528c6fbf4fe4088575a7c4e704037","user":{"login":"bogdanustyak","id":3966368,"node_id":"MDQ6VXNlcjM5NjYzNjg=","avatar_url":"https://avatars0.githubusercontent.com/u/3966368?v=4","gravatar_id":"","url":"https://api.github.com/users/bogdanustyak","html_url":"https://github.com/bogdanustyak","followers_url":"https://api.github.com/users/bogdanustyak/followers","following_url":"https://api.github.com/users/bogdanustyak/following{/other_user}","gists_url":"https://api.github.com/users/bogdanustyak/gists{/gist_id}","starred_url":"https://api.github.com/users/bogdanustyak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bogdanustyak/subscriptions","organizations_url":"https://api.github.com/users/bogdanustyak/orgs","repos_url":"https://api.github.com/users/bogdanustyak/repos","events_url":"https://api.github.com/users/bogdanustyak/events{/privacy}","received_events_url":"https://api.github.com/users/bogdanustyak/received_events","type":"User","site_admin":false},"repo":{"id":74668243,"node_id":"MDEwOlJlcG9zaXRvcnk3NDY2ODI0Mw==","name":"KoreanPhraseBook","full_name":"bogdanustyak/KoreanPhraseBook","owner":{"login":"bogdanustyak","id":3966368,"node_id":"MDQ6VXNlcjM5NjYzNjg=","avatar_url":"https://avatars0.githubusercontent.com/u/3966368?v=4","gravatar_id":"","url":"https://api.github.com/users/bogdanustyak","html_url":"https://github.com/bogdanustyak","followers_url":"https://api.github.com/users/bogdanustyak/followers","following_url":"https://api.github.com/users/bogdanustyak/following{/other_user}","gists_url":"https://api.github.com/users/bogdanustyak/gists{/gist_id}","starred_url":"https://api.github.com/users/bogdanustyak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bogdanustyak/subscriptions","organizations_url":"https://api.github.com/users/bogdanustyak/orgs","repos_url":"https://api.github.com/users/bogdanustyak/repos","events_url":"https://api.github.com/users/bogdanustyak/events{/privacy}","received_events_url":"https://api.github.com/users/bogdanustyak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bogdanustyak/KoreanPhraseBook","description":null,"fork":false,"url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook","forks_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/forks","keys_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/teams","hooks_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/hooks","issue_events_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/issues/events{/number}","events_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/events","assignees_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/assignees{/user}","branches_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/branches{/branch}","tags_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/tags","blobs_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/git/refs{/sha}","trees_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/statuses/{sha}","languages_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/languages","stargazers_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/stargazers","contributors_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/contributors","subscribers_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/subscribers","subscription_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/subscription","commits_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/commits{/sha}","git_commits_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/git/commits{/sha}","comments_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/comments{/number}","issue_comment_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/issues/comments{/number}","contents_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/contents/{+path}","compare_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/merges","archive_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/downloads","issues_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/issues{/number}","pulls_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/pulls{/number}","milestones_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/milestones{/number}","notifications_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/labels{/name}","releases_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/releases{/id}","deployments_url":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/deployments","created_at":"2016-11-24T11:46:16Z","updated_at":"2016-11-24T11:50:39Z","pushed_at":"2018-07-24T14:41:37Z","git_url":"git://github.com/bogdanustyak/KoreanPhraseBook.git","ssh_url":"git@github.com:bogdanustyak/KoreanPhraseBook.git","clone_url":"https://github.com/bogdanustyak/KoreanPhraseBook.git","svn_url":"https://github.com/bogdanustyak/KoreanPhraseBook","homepage":null,"size":6526,"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":3,"license":null,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/pulls/9"},"html":{"href":"https://github.com/bogdanustyak/KoreanPhraseBook/pull/9"},"issue":{"href":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/issues/9"},"comments":{"href":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/bogdanustyak/KoreanPhraseBook/statuses/169c4ba28d9f75ddb4e7eddb2a5557600586cd65"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"khrystynapochynok"}}