{"action":"created","comment":{"url":"https://api.github.com/repos/Integreat/integreat-react-native-app/pulls/comments/285340708","pull_request_review_id":239196919,"id":285340708,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI4NTM0MDcwOA==","diff_hunk":"@@ -4,32 +4,51 @@ import createNavigateToCategory from './createNavigateToCategory'\n import type { Dispatch } from 'redux'\n import type { NavigationScreenProp } from 'react-navigation'\n import createNavigateToEvent from './createNavigateToEvent'\n+import type { SetContentLanguageActionType } from './StoreActionType'\n \n export default (dispatch: Dispatch<*>, navigation: NavigationScreenProp<*>) =>\n-  (url: string, cityCode: string, language: string) => {\n+  ({url, cityCode, language}: {|url: string, cityCode: string, language: string|}) => {\n     const parts = url.split('/').filter(segment => segment)\n     const pathnameParts = parts.splice(2)\n+    const newCity = pathnameParts[0]\n+    const newLanguage = pathnameParts[1]\n     const pathname = pathnameParts.reduce((acc, part) => `${acc}/${part}`, '')\n \n-    if (pathnameParts[0] === cityCode && (!pathnameParts[1] || pathnameParts[1] === language)) {\n-      // same city and language\n+    // todo add support for linking to different cities\n+\n+    if (newCity === cityCode) {\n+      // same city\n+\n+      if (newLanguage !== language) {\n+        const setContentLanguage: SetContentLanguageActionType = {\n+          type: 'SET_CONTENT_LANGUAGE',\n+          params: {\n+            newLanguage\n+          }\n+        }\n+        dispatch(setContentLanguage)","path":"src/modules/app/createNavigateToIntegreatUrl.js","position":29,"original_position":29,"commit_id":"dd9c3323af123b1a13e29530f11596ea7b7ba0f9","original_commit_id":"d896bc9f9a42b0b7b67716c6fa0c59862b751c8c","user":{"login":"Schedulaar","id":7025199,"node_id":"MDQ6VXNlcjcwMjUxOTk=","avatar_url":"https://avatars3.githubusercontent.com/u/7025199?v=4","gravatar_id":"","url":"https://api.github.com/users/Schedulaar","html_url":"https://github.com/Schedulaar","followers_url":"https://api.github.com/users/Schedulaar/followers","following_url":"https://api.github.com/users/Schedulaar/following{/other_user}","gists_url":"https://api.github.com/users/Schedulaar/gists{/gist_id}","starred_url":"https://api.github.com/users/Schedulaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Schedulaar/subscriptions","organizations_url":"https://api.github.com/users/Schedulaar/orgs","repos_url":"https://api.github.com/users/Schedulaar/repos","events_url":"https://api.github.com/users/Schedulaar/events{/privacy}","received_events_url":"https://api.github.com/users/Schedulaar/received_events","type":"User","site_admin":false},"body":"Yes, that's true; I think as a user, it makes more sense to have the original language when navigating back... On the other hand this increases complexity a lot (having multiple languages opened at the same time) for a use-case that should not occur (because the links deployed by the cms should target the same language)... :thinking: ","created_at":"2019-05-18T12:29:14Z","updated_at":"2019-05-18T12:29:14Z","html_url":"https://github.com/Integreat/integreat-react-native-app/pull/57#discussion_r285340708","pull_request_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/pulls/57","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Integreat/integreat-react-native-app/pulls/comments/285340708"},"html":{"href":"https://github.com/Integreat/integreat-react-native-app/pull/57#discussion_r285340708"},"pull_request":{"href":"https://api.github.com/repos/Integreat/integreat-react-native-app/pulls/57"}},"in_reply_to_id":285201770},"pull_request":{"url":"https://api.github.com/repos/Integreat/integreat-react-native-app/pulls/57","id":277399842,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjc3Mzk5ODQy","html_url":"https://github.com/Integreat/integreat-react-native-app/pull/57","diff_url":"https://github.com/Integreat/integreat-react-native-app/pull/57.diff","patch_url":"https://github.com/Integreat/integreat-react-native-app/pull/57.patch","issue_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/issues/57","number":57,"state":"open","locked":false,"title":"NATIVE-111: Linking to other languages","user":{"login":"klinzo","id":29095487,"node_id":"MDQ6VXNlcjI5MDk1NDg3","avatar_url":"https://avatars3.githubusercontent.com/u/29095487?v=4","gravatar_id":"","url":"https://api.github.com/users/klinzo","html_url":"https://github.com/klinzo","followers_url":"https://api.github.com/users/klinzo/followers","following_url":"https://api.github.com/users/klinzo/following{/other_user}","gists_url":"https://api.github.com/users/klinzo/gists{/gist_id}","starred_url":"https://api.github.com/users/klinzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klinzo/subscriptions","organizations_url":"https://api.github.com/users/klinzo/orgs","repos_url":"https://api.github.com/users/klinzo/repos","events_url":"https://api.github.com/users/klinzo/events{/privacy}","received_events_url":"https://api.github.com/users/klinzo/received_events","type":"User","site_admin":false},"body":"","created_at":"2019-05-09T13:47:27Z","updated_at":"2019-05-18T12:29:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"19f787c4ec6a015d00dcb0333946f783489abe4f","assignee":null,"assignees":[],"requested_reviewers":[{"login":"thimmy687","id":7715216,"node_id":"MDQ6VXNlcjc3MTUyMTY=","avatar_url":"https://avatars2.githubusercontent.com/u/7715216?v=4","gravatar_id":"","url":"https://api.github.com/users/thimmy687","html_url":"https://github.com/thimmy687","followers_url":"https://api.github.com/users/thimmy687/followers","following_url":"https://api.github.com/users/thimmy687/following{/other_user}","gists_url":"https://api.github.com/users/thimmy687/gists{/gist_id}","starred_url":"https://api.github.com/users/thimmy687/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thimmy687/subscriptions","organizations_url":"https://api.github.com/users/thimmy687/orgs","repos_url":"https://api.github.com/users/thimmy687/repos","events_url":"https://api.github.com/users/thimmy687/events{/privacy}","received_events_url":"https://api.github.com/users/thimmy687/received_events","type":"User","site_admin":false},{"login":"Simple-codinger","id":10844097,"node_id":"MDQ6VXNlcjEwODQ0MDk3","avatar_url":"https://avatars1.githubusercontent.com/u/10844097?v=4","gravatar_id":"","url":"https://api.github.com/users/Simple-codinger","html_url":"https://github.com/Simple-codinger","followers_url":"https://api.github.com/users/Simple-codinger/followers","following_url":"https://api.github.com/users/Simple-codinger/following{/other_user}","gists_url":"https://api.github.com/users/Simple-codinger/gists{/gist_id}","starred_url":"https://api.github.com/users/Simple-codinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Simple-codinger/subscriptions","organizations_url":"https://api.github.com/users/Simple-codinger/orgs","repos_url":"https://api.github.com/users/Simple-codinger/repos","events_url":"https://api.github.com/users/Simple-codinger/events{/privacy}","received_events_url":"https://api.github.com/users/Simple-codinger/received_events","type":"User","site_admin":false},{"login":"a-kud","id":14137213,"node_id":"MDQ6VXNlcjE0MTM3MjEz","avatar_url":"https://avatars3.githubusercontent.com/u/14137213?v=4","gravatar_id":"","url":"https://api.github.com/users/a-kud","html_url":"https://github.com/a-kud","followers_url":"https://api.github.com/users/a-kud/followers","following_url":"https://api.github.com/users/a-kud/following{/other_user}","gists_url":"https://api.github.com/users/a-kud/gists{/gist_id}","starred_url":"https://api.github.com/users/a-kud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-kud/subscriptions","organizations_url":"https://api.github.com/users/a-kud/orgs","repos_url":"https://api.github.com/users/a-kud/repos","events_url":"https://api.github.com/users/a-kud/events{/privacy}","received_events_url":"https://api.github.com/users/a-kud/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/pulls/57/commits","review_comments_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/pulls/57/comments","review_comment_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/issues/57/comments","statuses_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/statuses/dd9c3323af123b1a13e29530f11596ea7b7ba0f9","head":{"label":"Integreat:NATIVE-111-Linking-to-other-languages","ref":"NATIVE-111-Linking-to-other-languages","sha":"dd9c3323af123b1a13e29530f11596ea7b7ba0f9","user":{"login":"Integreat","id":15210781,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MjEwNzgx","avatar_url":"https://avatars0.githubusercontent.com/u/15210781?v=4","gravatar_id":"","url":"https://api.github.com/users/Integreat","html_url":"https://github.com/Integreat","followers_url":"https://api.github.com/users/Integreat/followers","following_url":"https://api.github.com/users/Integreat/following{/other_user}","gists_url":"https://api.github.com/users/Integreat/gists{/gist_id}","starred_url":"https://api.github.com/users/Integreat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Integreat/subscriptions","organizations_url":"https://api.github.com/users/Integreat/orgs","repos_url":"https://api.github.com/users/Integreat/repos","events_url":"https://api.github.com/users/Integreat/events{/privacy}","received_events_url":"https://api.github.com/users/Integreat/received_events","type":"Organization","site_admin":false},"repo":{"id":138486915,"node_id":"MDEwOlJlcG9zaXRvcnkxMzg0ODY5MTU=","name":"integreat-react-native-app","full_name":"Integreat/integreat-react-native-app","private":false,"owner":{"login":"Integreat","id":15210781,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MjEwNzgx","avatar_url":"https://avatars0.githubusercontent.com/u/15210781?v=4","gravatar_id":"","url":"https://api.github.com/users/Integreat","html_url":"https://github.com/Integreat","followers_url":"https://api.github.com/users/Integreat/followers","following_url":"https://api.github.com/users/Integreat/following{/other_user}","gists_url":"https://api.github.com/users/Integreat/gists{/gist_id}","starred_url":"https://api.github.com/users/Integreat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Integreat/subscriptions","organizations_url":"https://api.github.com/users/Integreat/orgs","repos_url":"https://api.github.com/users/Integreat/repos","events_url":"https://api.github.com/users/Integreat/events{/privacy}","received_events_url":"https://api.github.com/users/Integreat/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Integreat/integreat-react-native-app","description":"React Native client for integreat","fork":false,"url":"https://api.github.com/repos/Integreat/integreat-react-native-app","forks_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/forks","keys_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/teams","hooks_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/hooks","issue_events_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/issues/events{/number}","events_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/events","assignees_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/assignees{/user}","branches_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/branches{/branch}","tags_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/tags","blobs_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/statuses/{sha}","languages_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/languages","stargazers_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/stargazers","contributors_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/contributors","subscribers_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/subscribers","subscription_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/subscription","commits_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/contents/{+path}","compare_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/merges","archive_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/downloads","issues_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/issues{/number}","pulls_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/pulls{/number}","milestones_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/milestones{/number}","notifications_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/labels{/name}","releases_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/releases{/id}","deployments_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/deployments","created_at":"2018-06-24T14:05:58Z","updated_at":"2019-05-18T11:06:39Z","pushed_at":"2019-05-18T12:04:44Z","git_url":"git://github.com/Integreat/integreat-react-native-app.git","ssh_url":"git@github.com:Integreat/integreat-react-native-app.git","clone_url":"https://github.com/Integreat/integreat-react-native-app.git","svn_url":"https://github.com/Integreat/integreat-react-native-app","homepage":"","size":7836,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":6,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":2,"open_issues":6,"watchers":4,"default_branch":"develop"}},"base":{"label":"Integreat:NATIVE-46-AddPullToRefresh","ref":"NATIVE-46-AddPullToRefresh","sha":"472c3bba546206c2a3f4d2fd78201977e9f7cea9","user":{"login":"Integreat","id":15210781,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MjEwNzgx","avatar_url":"https://avatars0.githubusercontent.com/u/15210781?v=4","gravatar_id":"","url":"https://api.github.com/users/Integreat","html_url":"https://github.com/Integreat","followers_url":"https://api.github.com/users/Integreat/followers","following_url":"https://api.github.com/users/Integreat/following{/other_user}","gists_url":"https://api.github.com/users/Integreat/gists{/gist_id}","starred_url":"https://api.github.com/users/Integreat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Integreat/subscriptions","organizations_url":"https://api.github.com/users/Integreat/orgs","repos_url":"https://api.github.com/users/Integreat/repos","events_url":"https://api.github.com/users/Integreat/events{/privacy}","received_events_url":"https://api.github.com/users/Integreat/received_events","type":"Organization","site_admin":false},"repo":{"id":138486915,"node_id":"MDEwOlJlcG9zaXRvcnkxMzg0ODY5MTU=","name":"integreat-react-native-app","full_name":"Integreat/integreat-react-native-app","private":false,"owner":{"login":"Integreat","id":15210781,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MjEwNzgx","avatar_url":"https://avatars0.githubusercontent.com/u/15210781?v=4","gravatar_id":"","url":"https://api.github.com/users/Integreat","html_url":"https://github.com/Integreat","followers_url":"https://api.github.com/users/Integreat/followers","following_url":"https://api.github.com/users/Integreat/following{/other_user}","gists_url":"https://api.github.com/users/Integreat/gists{/gist_id}","starred_url":"https://api.github.com/users/Integreat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Integreat/subscriptions","organizations_url":"https://api.github.com/users/Integreat/orgs","repos_url":"https://api.github.com/users/Integreat/repos","events_url":"https://api.github.com/users/Integreat/events{/privacy}","received_events_url":"https://api.github.com/users/Integreat/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Integreat/integreat-react-native-app","description":"React Native client for integreat","fork":false,"url":"https://api.github.com/repos/Integreat/integreat-react-native-app","forks_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/forks","keys_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/teams","hooks_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/hooks","issue_events_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/issues/events{/number}","events_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/events","assignees_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/assignees{/user}","branches_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/branches{/branch}","tags_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/tags","blobs_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/statuses/{sha}","languages_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/languages","stargazers_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/stargazers","contributors_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/contributors","subscribers_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/subscribers","subscription_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/subscription","commits_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/contents/{+path}","compare_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/merges","archive_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/downloads","issues_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/issues{/number}","pulls_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/pulls{/number}","milestones_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/milestones{/number}","notifications_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/labels{/name}","releases_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/releases{/id}","deployments_url":"https://api.github.com/repos/Integreat/integreat-react-native-app/deployments","created_at":"2018-06-24T14:05:58Z","updated_at":"2019-05-18T11:06:39Z","pushed_at":"2019-05-18T12:04:44Z","git_url":"git://github.com/Integreat/integreat-react-native-app.git","ssh_url":"git@github.com:Integreat/integreat-react-native-app.git","clone_url":"https://github.com/Integreat/integreat-react-native-app.git","svn_url":"https://github.com/Integreat/integreat-react-native-app","homepage":"","size":7836,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":6,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":2,"open_issues":6,"watchers":4,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Integreat/integreat-react-native-app/pulls/57"},"html":{"href":"https://github.com/Integreat/integreat-react-native-app/pull/57"},"issue":{"href":"https://api.github.com/repos/Integreat/integreat-react-native-app/issues/57"},"comments":{"href":"https://api.github.com/repos/Integreat/integreat-react-native-app/issues/57/comments"},"review_comments":{"href":"https://api.github.com/repos/Integreat/integreat-react-native-app/pulls/57/comments"},"review_comment":{"href":"https://api.github.com/repos/Integreat/integreat-react-native-app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Integreat/integreat-react-native-app/pulls/57/commits"},"statuses":{"href":"https://api.github.com/repos/Integreat/integreat-react-native-app/statuses/dd9c3323af123b1a13e29530f11596ea7b7ba0f9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Schedulaar"}}