{"action":"created","comment":{"url":"https://api.github.com/repos/grihabor/garbage-clicker/pulls/comments/174717767","pull_request_review_id":104122715,"id":174717767,"diff_hunk":"@@ -12,7 +16,32 @@\n     public HashMap<String, String> getViewData(){\n         HashMap<String, String> map = new HashMap<>();\n         map.put(\"Name\", name);\n-        map.put(\"Price\", \"Стоимость : \"+String.valueOf(price));\n+        map.put(\"Price\", \"Стоимость : \" + getPrice());\n         return map;\n     }\n+\n+    void buy (Context context, OnMoneyUpdateListener listener) {\n+        SharedPreferences preferences = context.getSharedPreferences(MainActivity.PREF_NAME, Context.MODE_PRIVATE);\n+        int MoneyNow = preferences.getInt(MainActivity.MONEY_KEY, 0);\n+        if (MoneyNow >= getPrice()) {\n+            apply(context);\n+\n+            SharedPreferences.Editor editor = preferences.edit();\n+            editor.putInt(MainActivity.MONEY_KEY, MoneyNow - getPrice());\n+            editor.apply();\n+\n+            listener.OnMoneyUpdate();\n+        }\n+        else {\n+            Toast.makeText(context, \"не хватает средств\", Toast.LENGTH_SHORT).show();\n+        }\n+    }\n+\n+    void apply (Context context) {","path":"app/src/main/java/ru/sibur/android/garbagecollector/ShopItem.java","position":36,"original_position":36,"commit_id":"4fa17a9d6caeb9ec7096ab856180af501c3559bf","original_commit_id":"dd975023159a6346c0681aafdf223492e5c4c4a2","user":{"login":"RedSnail","id":36077611,"avatar_url":"https://avatars0.githubusercontent.com/u/36077611?v=4","gravatar_id":"","url":"https://api.github.com/users/RedSnail","html_url":"https://github.com/RedSnail","followers_url":"https://api.github.com/users/RedSnail/followers","following_url":"https://api.github.com/users/RedSnail/following{/other_user}","gists_url":"https://api.github.com/users/RedSnail/gists{/gist_id}","starred_url":"https://api.github.com/users/RedSnail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RedSnail/subscriptions","organizations_url":"https://api.github.com/users/RedSnail/orgs","repos_url":"https://api.github.com/users/RedSnail/repos","events_url":"https://api.github.com/users/RedSnail/events{/privacy}","received_events_url":"https://api.github.com/users/RedSnail/received_events","type":"User","site_admin":false},"body":"ок","created_at":"2018-03-15T09:18:18Z","updated_at":"2018-03-15T09:18:18Z","html_url":"https://github.com/grihabor/garbage-clicker/pull/63#discussion_r174717767","pull_request_url":"https://api.github.com/repos/grihabor/garbage-clicker/pulls/63","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/grihabor/garbage-clicker/pulls/comments/174717767"},"html":{"href":"https://github.com/grihabor/garbage-clicker/pull/63#discussion_r174717767"},"pull_request":{"href":"https://api.github.com/repos/grihabor/garbage-clicker/pulls/63"}},"in_reply_to_id":174081931},"pull_request":{"url":"https://api.github.com/repos/grihabor/garbage-clicker/pulls/63","id":174356258,"html_url":"https://github.com/grihabor/garbage-clicker/pull/63","diff_url":"https://github.com/grihabor/garbage-clicker/pull/63.diff","patch_url":"https://github.com/grihabor/garbage-clicker/pull/63.patch","issue_url":"https://api.github.com/repos/grihabor/garbage-clicker/issues/63","number":63,"state":"closed","locked":false,"title":"creating update executions","user":{"login":"RedSnail","id":36077611,"avatar_url":"https://avatars0.githubusercontent.com/u/36077611?v=4","gravatar_id":"","url":"https://api.github.com/users/RedSnail","html_url":"https://github.com/RedSnail","followers_url":"https://api.github.com/users/RedSnail/followers","following_url":"https://api.github.com/users/RedSnail/following{/other_user}","gists_url":"https://api.github.com/users/RedSnail/gists{/gist_id}","starred_url":"https://api.github.com/users/RedSnail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RedSnail/subscriptions","organizations_url":"https://api.github.com/users/RedSnail/orgs","repos_url":"https://api.github.com/users/RedSnail/repos","events_url":"https://api.github.com/users/RedSnail/events{/privacy}","received_events_url":"https://api.github.com/users/RedSnail/received_events","type":"User","site_admin":false},"body":"Создал дефолтный Execute(Context context) и установил его в качестве onClickListener во всех item.\r\n\r\nДля изменения onClickListener нужно лишь переопределить Execute в детях update\r\n\r\n#61 ","created_at":"2018-03-12T12:43:08Z","updated_at":"2018-03-15T09:18:18Z","closed_at":"2018-03-14T12:31:14Z","merged_at":null,"merge_commit_sha":"b0ff1fd8d641e1daff1d025edce6defa52f66d3e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/grihabor/garbage-clicker/pulls/63/commits","review_comments_url":"https://api.github.com/repos/grihabor/garbage-clicker/pulls/63/comments","review_comment_url":"https://api.github.com/repos/grihabor/garbage-clicker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/grihabor/garbage-clicker/issues/63/comments","statuses_url":"https://api.github.com/repos/grihabor/garbage-clicker/statuses/4fa17a9d6caeb9ec7096ab856180af501c3559bf","head":{"label":"grihabor:creating_updates_execution","ref":"creating_updates_execution","sha":"4fa17a9d6caeb9ec7096ab856180af501c3559bf","user":{"login":"grihabor","id":13349050,"avatar_url":"https://avatars1.githubusercontent.com/u/13349050?v=4","gravatar_id":"","url":"https://api.github.com/users/grihabor","html_url":"https://github.com/grihabor","followers_url":"https://api.github.com/users/grihabor/followers","following_url":"https://api.github.com/users/grihabor/following{/other_user}","gists_url":"https://api.github.com/users/grihabor/gists{/gist_id}","starred_url":"https://api.github.com/users/grihabor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grihabor/subscriptions","organizations_url":"https://api.github.com/users/grihabor/orgs","repos_url":"https://api.github.com/users/grihabor/repos","events_url":"https://api.github.com/users/grihabor/events{/privacy}","received_events_url":"https://api.github.com/users/grihabor/received_events","type":"User","site_admin":false},"repo":{"id":122976852,"name":"garbage-clicker","full_name":"grihabor/garbage-clicker","owner":{"login":"grihabor","id":13349050,"avatar_url":"https://avatars1.githubusercontent.com/u/13349050?v=4","gravatar_id":"","url":"https://api.github.com/users/grihabor","html_url":"https://github.com/grihabor","followers_url":"https://api.github.com/users/grihabor/followers","following_url":"https://api.github.com/users/grihabor/following{/other_user}","gists_url":"https://api.github.com/users/grihabor/gists{/gist_id}","starred_url":"https://api.github.com/users/grihabor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grihabor/subscriptions","organizations_url":"https://api.github.com/users/grihabor/orgs","repos_url":"https://api.github.com/users/grihabor/repos","events_url":"https://api.github.com/users/grihabor/events{/privacy}","received_events_url":"https://api.github.com/users/grihabor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/grihabor/garbage-clicker","description":"Аналог cookie clicker с мусоркой","fork":false,"url":"https://api.github.com/repos/grihabor/garbage-clicker","forks_url":"https://api.github.com/repos/grihabor/garbage-clicker/forks","keys_url":"https://api.github.com/repos/grihabor/garbage-clicker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grihabor/garbage-clicker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grihabor/garbage-clicker/teams","hooks_url":"https://api.github.com/repos/grihabor/garbage-clicker/hooks","issue_events_url":"https://api.github.com/repos/grihabor/garbage-clicker/issues/events{/number}","events_url":"https://api.github.com/repos/grihabor/garbage-clicker/events","assignees_url":"https://api.github.com/repos/grihabor/garbage-clicker/assignees{/user}","branches_url":"https://api.github.com/repos/grihabor/garbage-clicker/branches{/branch}","tags_url":"https://api.github.com/repos/grihabor/garbage-clicker/tags","blobs_url":"https://api.github.com/repos/grihabor/garbage-clicker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grihabor/garbage-clicker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grihabor/garbage-clicker/git/refs{/sha}","trees_url":"https://api.github.com/repos/grihabor/garbage-clicker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grihabor/garbage-clicker/statuses/{sha}","languages_url":"https://api.github.com/repos/grihabor/garbage-clicker/languages","stargazers_url":"https://api.github.com/repos/grihabor/garbage-clicker/stargazers","contributors_url":"https://api.github.com/repos/grihabor/garbage-clicker/contributors","subscribers_url":"https://api.github.com/repos/grihabor/garbage-clicker/subscribers","subscription_url":"https://api.github.com/repos/grihabor/garbage-clicker/subscription","commits_url":"https://api.github.com/repos/grihabor/garbage-clicker/commits{/sha}","git_commits_url":"https://api.github.com/repos/grihabor/garbage-clicker/git/commits{/sha}","comments_url":"https://api.github.com/repos/grihabor/garbage-clicker/comments{/number}","issue_comment_url":"https://api.github.com/repos/grihabor/garbage-clicker/issues/comments{/number}","contents_url":"https://api.github.com/repos/grihabor/garbage-clicker/contents/{+path}","compare_url":"https://api.github.com/repos/grihabor/garbage-clicker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grihabor/garbage-clicker/merges","archive_url":"https://api.github.com/repos/grihabor/garbage-clicker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grihabor/garbage-clicker/downloads","issues_url":"https://api.github.com/repos/grihabor/garbage-clicker/issues{/number}","pulls_url":"https://api.github.com/repos/grihabor/garbage-clicker/pulls{/number}","milestones_url":"https://api.github.com/repos/grihabor/garbage-clicker/milestones{/number}","notifications_url":"https://api.github.com/repos/grihabor/garbage-clicker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grihabor/garbage-clicker/labels{/name}","releases_url":"https://api.github.com/repos/grihabor/garbage-clicker/releases{/id}","deployments_url":"https://api.github.com/repos/grihabor/garbage-clicker/deployments","created_at":"2018-02-26T13:53:15Z","updated_at":"2018-03-14T13:25:18Z","pushed_at":"2018-03-15T09:05:23Z","git_url":"git://github.com/grihabor/garbage-clicker.git","ssh_url":"git@github.com:grihabor/garbage-clicker.git","clone_url":"https://github.com/grihabor/garbage-clicker.git","svn_url":"https://github.com/grihabor/garbage-clicker","homepage":null,"size":364,"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":1,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":9,"watchers":0,"default_branch":"master"}},"base":{"label":"grihabor:master","ref":"master","sha":"73ecf767f34cdf44eff52b2297ef3f4ae8188e32","user":{"login":"grihabor","id":13349050,"avatar_url":"https://avatars1.githubusercontent.com/u/13349050?v=4","gravatar_id":"","url":"https://api.github.com/users/grihabor","html_url":"https://github.com/grihabor","followers_url":"https://api.github.com/users/grihabor/followers","following_url":"https://api.github.com/users/grihabor/following{/other_user}","gists_url":"https://api.github.com/users/grihabor/gists{/gist_id}","starred_url":"https://api.github.com/users/grihabor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grihabor/subscriptions","organizations_url":"https://api.github.com/users/grihabor/orgs","repos_url":"https://api.github.com/users/grihabor/repos","events_url":"https://api.github.com/users/grihabor/events{/privacy}","received_events_url":"https://api.github.com/users/grihabor/received_events","type":"User","site_admin":false},"repo":{"id":122976852,"name":"garbage-clicker","full_name":"grihabor/garbage-clicker","owner":{"login":"grihabor","id":13349050,"avatar_url":"https://avatars1.githubusercontent.com/u/13349050?v=4","gravatar_id":"","url":"https://api.github.com/users/grihabor","html_url":"https://github.com/grihabor","followers_url":"https://api.github.com/users/grihabor/followers","following_url":"https://api.github.com/users/grihabor/following{/other_user}","gists_url":"https://api.github.com/users/grihabor/gists{/gist_id}","starred_url":"https://api.github.com/users/grihabor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grihabor/subscriptions","organizations_url":"https://api.github.com/users/grihabor/orgs","repos_url":"https://api.github.com/users/grihabor/repos","events_url":"https://api.github.com/users/grihabor/events{/privacy}","received_events_url":"https://api.github.com/users/grihabor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/grihabor/garbage-clicker","description":"Аналог cookie clicker с мусоркой","fork":false,"url":"https://api.github.com/repos/grihabor/garbage-clicker","forks_url":"https://api.github.com/repos/grihabor/garbage-clicker/forks","keys_url":"https://api.github.com/repos/grihabor/garbage-clicker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grihabor/garbage-clicker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grihabor/garbage-clicker/teams","hooks_url":"https://api.github.com/repos/grihabor/garbage-clicker/hooks","issue_events_url":"https://api.github.com/repos/grihabor/garbage-clicker/issues/events{/number}","events_url":"https://api.github.com/repos/grihabor/garbage-clicker/events","assignees_url":"https://api.github.com/repos/grihabor/garbage-clicker/assignees{/user}","branches_url":"https://api.github.com/repos/grihabor/garbage-clicker/branches{/branch}","tags_url":"https://api.github.com/repos/grihabor/garbage-clicker/tags","blobs_url":"https://api.github.com/repos/grihabor/garbage-clicker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grihabor/garbage-clicker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grihabor/garbage-clicker/git/refs{/sha}","trees_url":"https://api.github.com/repos/grihabor/garbage-clicker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grihabor/garbage-clicker/statuses/{sha}","languages_url":"https://api.github.com/repos/grihabor/garbage-clicker/languages","stargazers_url":"https://api.github.com/repos/grihabor/garbage-clicker/stargazers","contributors_url":"https://api.github.com/repos/grihabor/garbage-clicker/contributors","subscribers_url":"https://api.github.com/repos/grihabor/garbage-clicker/subscribers","subscription_url":"https://api.github.com/repos/grihabor/garbage-clicker/subscription","commits_url":"https://api.github.com/repos/grihabor/garbage-clicker/commits{/sha}","git_commits_url":"https://api.github.com/repos/grihabor/garbage-clicker/git/commits{/sha}","comments_url":"https://api.github.com/repos/grihabor/garbage-clicker/comments{/number}","issue_comment_url":"https://api.github.com/repos/grihabor/garbage-clicker/issues/comments{/number}","contents_url":"https://api.github.com/repos/grihabor/garbage-clicker/contents/{+path}","compare_url":"https://api.github.com/repos/grihabor/garbage-clicker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grihabor/garbage-clicker/merges","archive_url":"https://api.github.com/repos/grihabor/garbage-clicker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grihabor/garbage-clicker/downloads","issues_url":"https://api.github.com/repos/grihabor/garbage-clicker/issues{/number}","pulls_url":"https://api.github.com/repos/grihabor/garbage-clicker/pulls{/number}","milestones_url":"https://api.github.com/repos/grihabor/garbage-clicker/milestones{/number}","notifications_url":"https://api.github.com/repos/grihabor/garbage-clicker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grihabor/garbage-clicker/labels{/name}","releases_url":"https://api.github.com/repos/grihabor/garbage-clicker/releases{/id}","deployments_url":"https://api.github.com/repos/grihabor/garbage-clicker/deployments","created_at":"2018-02-26T13:53:15Z","updated_at":"2018-03-14T13:25:18Z","pushed_at":"2018-03-15T09:05:23Z","git_url":"git://github.com/grihabor/garbage-clicker.git","ssh_url":"git@github.com:grihabor/garbage-clicker.git","clone_url":"https://github.com/grihabor/garbage-clicker.git","svn_url":"https://github.com/grihabor/garbage-clicker","homepage":null,"size":364,"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":1,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":9,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/grihabor/garbage-clicker/pulls/63"},"html":{"href":"https://github.com/grihabor/garbage-clicker/pull/63"},"issue":{"href":"https://api.github.com/repos/grihabor/garbage-clicker/issues/63"},"comments":{"href":"https://api.github.com/repos/grihabor/garbage-clicker/issues/63/comments"},"review_comments":{"href":"https://api.github.com/repos/grihabor/garbage-clicker/pulls/63/comments"},"review_comment":{"href":"https://api.github.com/repos/grihabor/garbage-clicker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/grihabor/garbage-clicker/pulls/63/commits"},"statuses":{"href":"https://api.github.com/repos/grihabor/garbage-clicker/statuses/4fa17a9d6caeb9ec7096ab856180af501c3559bf"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"RedSnail"}}