{"action":"closed","number":23,"pull_request":{"url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/pulls/23","id":290597571,"node_id":"MDExOlB1bGxSZXF1ZXN0MjkwNTk3NTcx","html_url":"https://github.com/meirrosendorff/RecipeAid-IOS/pull/23","diff_url":"https://github.com/meirrosendorff/RecipeAid-IOS/pull/23.diff","patch_url":"https://github.com/meirrosendorff/RecipeAid-IOS/pull/23.patch","issue_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/issues/23","number":23,"state":"closed","locked":false,"title":"Mvvm/settings","user":{"login":"meirrosendorff","id":22748882,"node_id":"MDQ6VXNlcjIyNzQ4ODgy","avatar_url":"https://avatars0.githubusercontent.com/u/22748882?v=4","gravatar_id":"","url":"https://api.github.com/users/meirrosendorff","html_url":"https://github.com/meirrosendorff","followers_url":"https://api.github.com/users/meirrosendorff/followers","following_url":"https://api.github.com/users/meirrosendorff/following{/other_user}","gists_url":"https://api.github.com/users/meirrosendorff/gists{/gist_id}","starred_url":"https://api.github.com/users/meirrosendorff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meirrosendorff/subscriptions","organizations_url":"https://api.github.com/users/meirrosendorff/orgs","repos_url":"https://api.github.com/users/meirrosendorff/repos","events_url":"https://api.github.com/users/meirrosendorff/events{/privacy}","received_events_url":"https://api.github.com/users/meirrosendorff/received_events","type":"User","site_admin":false},"body":"In this pull request I refactored the settings page to use an MVVM architecture and added functionality so that it works and saves the settings persistently.\r\n\r\nMain changes: \r\n- Added the SettingsViewModel class, its protocol SettingsViewModelProtocol and the SettingsModel class.\r\n- Added setUpUserDefaults to app delegate to set up the user defaults on the first time the app loads, the settings then uses this to store settings persistently.\r\n- Changed keyboard types for minCalories, maxCalories, minTime and maxTime textboxes to number pads.\r\n- Refactored the settingsViewController to use the SettingsViewModel.\r\n- Refactored DietryRestrictionsCollectionViewCell to use the SettingsViewModel.\r\n- Added invalidNumberString and minMaxError to RecipeErrors Enum.\r\n- Created the Extensions Group and added an extension to UIViewController to drop the keyboard when the screen is tapped.","created_at":"2019-06-21T12:57:24Z","updated_at":"2019-06-21T13:07:40Z","closed_at":"2019-06-21T13:07:40Z","merged_at":"2019-06-21T13:07:40Z","merge_commit_sha":"99b188285af3799155c153d4c7a29d3c1024515d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/pulls/23/commits","review_comments_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/pulls/23/comments","review_comment_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/issues/23/comments","statuses_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/statuses/bf09559f77d90c7ed0e90465dfd344f16b41823d","head":{"label":"meirrosendorff:MVVM/settings","ref":"MVVM/settings","sha":"bf09559f77d90c7ed0e90465dfd344f16b41823d","user":{"login":"meirrosendorff","id":22748882,"node_id":"MDQ6VXNlcjIyNzQ4ODgy","avatar_url":"https://avatars0.githubusercontent.com/u/22748882?v=4","gravatar_id":"","url":"https://api.github.com/users/meirrosendorff","html_url":"https://github.com/meirrosendorff","followers_url":"https://api.github.com/users/meirrosendorff/followers","following_url":"https://api.github.com/users/meirrosendorff/following{/other_user}","gists_url":"https://api.github.com/users/meirrosendorff/gists{/gist_id}","starred_url":"https://api.github.com/users/meirrosendorff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meirrosendorff/subscriptions","organizations_url":"https://api.github.com/users/meirrosendorff/orgs","repos_url":"https://api.github.com/users/meirrosendorff/repos","events_url":"https://api.github.com/users/meirrosendorff/events{/privacy}","received_events_url":"https://api.github.com/users/meirrosendorff/received_events","type":"User","site_admin":false},"repo":{"id":186289796,"node_id":"MDEwOlJlcG9zaXRvcnkxODYyODk3OTY=","name":"RecipeAid-IOS","full_name":"meirrosendorff/RecipeAid-IOS","private":false,"owner":{"login":"meirrosendorff","id":22748882,"node_id":"MDQ6VXNlcjIyNzQ4ODgy","avatar_url":"https://avatars0.githubusercontent.com/u/22748882?v=4","gravatar_id":"","url":"https://api.github.com/users/meirrosendorff","html_url":"https://github.com/meirrosendorff","followers_url":"https://api.github.com/users/meirrosendorff/followers","following_url":"https://api.github.com/users/meirrosendorff/following{/other_user}","gists_url":"https://api.github.com/users/meirrosendorff/gists{/gist_id}","starred_url":"https://api.github.com/users/meirrosendorff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meirrosendorff/subscriptions","organizations_url":"https://api.github.com/users/meirrosendorff/orgs","repos_url":"https://api.github.com/users/meirrosendorff/repos","events_url":"https://api.github.com/users/meirrosendorff/events{/privacy}","received_events_url":"https://api.github.com/users/meirrosendorff/received_events","type":"User","site_admin":false},"html_url":"https://github.com/meirrosendorff/RecipeAid-IOS","description":"Awesome tool for finding top recipes and setting your dinner schedule for the week!","fork":false,"url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS","forks_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/forks","keys_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/teams","hooks_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/hooks","issue_events_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/issues/events{/number}","events_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/events","assignees_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/assignees{/user}","branches_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/branches{/branch}","tags_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/tags","blobs_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/statuses/{sha}","languages_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/languages","stargazers_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/stargazers","contributors_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/contributors","subscribers_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/subscribers","subscription_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/subscription","commits_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/contents/{+path}","compare_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/merges","archive_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/downloads","issues_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/issues{/number}","pulls_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/pulls{/number}","milestones_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/milestones{/number}","notifications_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/labels{/name}","releases_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/releases{/id}","deployments_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/deployments","created_at":"2019-05-12T18:26:14Z","updated_at":"2019-05-24T09:48:41Z","pushed_at":"2019-06-21T13:07:40Z","git_url":"git://github.com/meirrosendorff/RecipeAid-IOS.git","ssh_url":"git@github.com:meirrosendorff/RecipeAid-IOS.git","clone_url":"https://github.com/meirrosendorff/RecipeAid-IOS.git","svn_url":"https://github.com/meirrosendorff/RecipeAid-IOS","homepage":null,"size":3129,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"meirrosendorff:develop","ref":"develop","sha":"ac9f0e5f6e496b6753cabeba782e20c8be114417","user":{"login":"meirrosendorff","id":22748882,"node_id":"MDQ6VXNlcjIyNzQ4ODgy","avatar_url":"https://avatars0.githubusercontent.com/u/22748882?v=4","gravatar_id":"","url":"https://api.github.com/users/meirrosendorff","html_url":"https://github.com/meirrosendorff","followers_url":"https://api.github.com/users/meirrosendorff/followers","following_url":"https://api.github.com/users/meirrosendorff/following{/other_user}","gists_url":"https://api.github.com/users/meirrosendorff/gists{/gist_id}","starred_url":"https://api.github.com/users/meirrosendorff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meirrosendorff/subscriptions","organizations_url":"https://api.github.com/users/meirrosendorff/orgs","repos_url":"https://api.github.com/users/meirrosendorff/repos","events_url":"https://api.github.com/users/meirrosendorff/events{/privacy}","received_events_url":"https://api.github.com/users/meirrosendorff/received_events","type":"User","site_admin":false},"repo":{"id":186289796,"node_id":"MDEwOlJlcG9zaXRvcnkxODYyODk3OTY=","name":"RecipeAid-IOS","full_name":"meirrosendorff/RecipeAid-IOS","private":false,"owner":{"login":"meirrosendorff","id":22748882,"node_id":"MDQ6VXNlcjIyNzQ4ODgy","avatar_url":"https://avatars0.githubusercontent.com/u/22748882?v=4","gravatar_id":"","url":"https://api.github.com/users/meirrosendorff","html_url":"https://github.com/meirrosendorff","followers_url":"https://api.github.com/users/meirrosendorff/followers","following_url":"https://api.github.com/users/meirrosendorff/following{/other_user}","gists_url":"https://api.github.com/users/meirrosendorff/gists{/gist_id}","starred_url":"https://api.github.com/users/meirrosendorff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meirrosendorff/subscriptions","organizations_url":"https://api.github.com/users/meirrosendorff/orgs","repos_url":"https://api.github.com/users/meirrosendorff/repos","events_url":"https://api.github.com/users/meirrosendorff/events{/privacy}","received_events_url":"https://api.github.com/users/meirrosendorff/received_events","type":"User","site_admin":false},"html_url":"https://github.com/meirrosendorff/RecipeAid-IOS","description":"Awesome tool for finding top recipes and setting your dinner schedule for the week!","fork":false,"url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS","forks_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/forks","keys_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/teams","hooks_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/hooks","issue_events_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/issues/events{/number}","events_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/events","assignees_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/assignees{/user}","branches_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/branches{/branch}","tags_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/tags","blobs_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/statuses/{sha}","languages_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/languages","stargazers_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/stargazers","contributors_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/contributors","subscribers_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/subscribers","subscription_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/subscription","commits_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/contents/{+path}","compare_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/merges","archive_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/downloads","issues_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/issues{/number}","pulls_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/pulls{/number}","milestones_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/milestones{/number}","notifications_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/labels{/name}","releases_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/releases{/id}","deployments_url":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/deployments","created_at":"2019-05-12T18:26:14Z","updated_at":"2019-05-24T09:48:41Z","pushed_at":"2019-06-21T13:07:40Z","git_url":"git://github.com/meirrosendorff/RecipeAid-IOS.git","ssh_url":"git@github.com:meirrosendorff/RecipeAid-IOS.git","clone_url":"https://github.com/meirrosendorff/RecipeAid-IOS.git","svn_url":"https://github.com/meirrosendorff/RecipeAid-IOS","homepage":null,"size":3129,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/pulls/23"},"html":{"href":"https://github.com/meirrosendorff/RecipeAid-IOS/pull/23"},"issue":{"href":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/issues/23"},"comments":{"href":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/meirrosendorff/RecipeAid-IOS/statuses/bf09559f77d90c7ed0e90465dfd344f16b41823d"}},"author_association":"OWNER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"meirrosendorff","id":22748882,"node_id":"MDQ6VXNlcjIyNzQ4ODgy","avatar_url":"https://avatars0.githubusercontent.com/u/22748882?v=4","gravatar_id":"","url":"https://api.github.com/users/meirrosendorff","html_url":"https://github.com/meirrosendorff","followers_url":"https://api.github.com/users/meirrosendorff/followers","following_url":"https://api.github.com/users/meirrosendorff/following{/other_user}","gists_url":"https://api.github.com/users/meirrosendorff/gists{/gist_id}","starred_url":"https://api.github.com/users/meirrosendorff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meirrosendorff/subscriptions","organizations_url":"https://api.github.com/users/meirrosendorff/orgs","repos_url":"https://api.github.com/users/meirrosendorff/repos","events_url":"https://api.github.com/users/meirrosendorff/events{/privacy}","received_events_url":"https://api.github.com/users/meirrosendorff/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":4,"additions":648,"deletions":153,"changed_files":13}}
{"actor":{"display_login":"meirrosendorff"}}