{"action":"created","comment":{"url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/pulls/comments/72613725","id":72613725,"diff_hunk":"@@ -49,66 +54,171 @@ class ActiveServerView extends React.Component<ActiveServerViewProps, ActiveServ\n }\n \n export interface ServerListViewProps {\n-  item: Server;\n+  item: IServerOption;\n };\n \n export interface ServerListViewState {};\n class ServerListView extends React.Component<ServerListViewProps, ServerListViewState> {\n   render() {\n-    let totalPlayers = (this.props.item.arthurians|0) + (this.props.item.tuathaDeDanann|0) + (this.props.item.vikings|0);\n-    let status = this.props.item.playerMaximum > 0 ? 'online' : 'offline';\n-    let accessLevel = AccessType[this.props.item.accessLevel];\n+    let totalPlayers = (this.props.item.serverInfo.arthurians|0) + (this.props.item.serverInfo.tuathaDeDanann|0) + (this.props.item.serverInfo.vikings|0);\n+    let status = this.props.item.serverInfo.playerMaximum > 0 ? 'online' : 'offline';\n+    let accessLevel = AccessType[this.props.item.serverInfo.accessLevel];\n+\n     return (\n       <div className='server-select quickselect-list'>\n         <div>\n           <div className='server-status'><div className={'indicator ' + status} data-position='right'\n             data-delay='150' data-tooltip={status} /></div>\n           <div className='server-details'>\n-            <h5 className='server'>{this.props.item.name} ({accessLevel})</h5>\n-            <h6 className='server-players'>Players Online: {totalPlayers}/{this.props.item.playerMaximum}</h6>\n+            <h5 className='server'>{this.props.item.displayName} ({accessLevel})</h5>\n+            <h6 className='server-players'>Players Online: {totalPlayers}/{this.props.item.serverInfo.playerMaximum}</h6>\n           </div>\n         </div>\n       </div>\n     );\n   }\n }\n \n+interface IServerOption {\n+  displayName: string;\n+  serverInfo: Server;\n+  channelInfo: Channel;\n+}\n+\n+function mapToProps(state: any): any {\n+  return {\n+    channelsState: state.channels,\n+    serversState: state.servers\n+  }\n+}\n+\n export interface ServerSelectProps {\n-  servers: Array<Server>;\n-  selectedServer: Server;\n-  onSelectedServerChanged: (server: Server) => void;\n+  dispatch?: (action: any) => void;\n+  channelsState?: ChannelState;  \n+  serversState?: ServersState;\n };\n \n export interface ServerSelectState {\n };\n \n class ServerSelect extends React.Component<ServerSelectProps, ServerSelectState> {\n   public name: string = 'cse-patcher-server-select';\n+  private mergedServerList: { [key:string] : IServerOption } = {};\n+  \n+  private listAsArray:Array<IServerOption> = null;\n \n   constructor(props: ServerSelectProps) {\n     super(props);\n   }\n \n-  onSelectedServerChanged = (server: any) => {\n-    this.props.onSelectedServerChanged(server);\n+  onSelectedServerChanged = (server: IServerOption) => {\n+    const { dispatch } = this.props;\n+\n+    events.fire('play-sound', 'select');\n+\n+    //is there a required order here?\n+    dispatch(changeChannel(server.channelInfo));\n+    dispatch(changeServer(server.serverInfo));\n+    dispatch(fetchCharacters());\n+    dispatch(selectCharacter(null));\n   }\n \n-  generateActiveView = (server: any) => {\n-    return <ActiveServerView item={server} />\n+  generateActiveView = (server: IServerOption) => {\n+    if(server.serverInfo)","path":"patcher/src/ts/sidebar/ServerSelect.tsx","position":105,"original_position":105,"commit_id":"b4e9c3cdba97e804f20960e802c524db66379561","original_commit_id":"b4e9c3cdba97e804f20960e802c524db66379561","user":{"login":"Mehuge","id":99895,"avatar_url":"https://avatars.githubusercontent.com/u/99895?v=3","gravatar_id":"","url":"https://api.github.com/users/Mehuge","html_url":"https://github.com/Mehuge","followers_url":"https://api.github.com/users/Mehuge/followers","following_url":"https://api.github.com/users/Mehuge/following{/other_user}","gists_url":"https://api.github.com/users/Mehuge/gists{/gist_id}","starred_url":"https://api.github.com/users/Mehuge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mehuge/subscriptions","organizations_url":"https://api.github.com/users/Mehuge/orgs","repos_url":"https://api.github.com/users/Mehuge/repos","events_url":"https://api.github.com/users/Mehuge/events{/privacy}","received_events_url":"https://api.github.com/users/Mehuge/received_events","type":"User","site_admin":false},"body":"```if (```","created_at":"2016-07-28T12:39:43Z","updated_at":"2016-07-28T12:39:43Z","html_url":"https://github.com/CUModSquad/Camelot-Unchained/pull/21#discussion_r72613725","pull_request_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/pulls/comments/72613725"},"html":{"href":"https://github.com/CUModSquad/Camelot-Unchained/pull/21#discussion_r72613725"},"pull_request":{"href":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/pulls/21","id":79143646,"html_url":"https://github.com/CUModSquad/Camelot-Unchained/pull/21","diff_url":"https://github.com/CUModSquad/Camelot-Unchained/pull/21.diff","patch_url":"https://github.com/CUModSquad/Camelot-Unchained/pull/21.patch","issue_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/issues/21","number":21,"state":"open","locked":false,"title":"Merge channel and server drop downs","user":{"login":"Shane7","id":6445629,"avatar_url":"https://avatars.githubusercontent.com/u/6445629?v=3","gravatar_id":"","url":"https://api.github.com/users/Shane7","html_url":"https://github.com/Shane7","followers_url":"https://api.github.com/users/Shane7/followers","following_url":"https://api.github.com/users/Shane7/following{/other_user}","gists_url":"https://api.github.com/users/Shane7/gists{/gist_id}","starred_url":"https://api.github.com/users/Shane7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shane7/subscriptions","organizations_url":"https://api.github.com/users/Shane7/orgs","repos_url":"https://api.github.com/users/Shane7/repos","events_url":"https://api.github.com/users/Shane7/events{/privacy}","received_events_url":"https://api.github.com/users/Shane7/received_events","type":"User","site_admin":false},"body":"merged drop downs, redux up sidebar sub components","created_at":"2016-07-28T06:35:54Z","updated_at":"2016-07-28T12:39:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"60f1301dcbec183d85e2e4d3abb4d5748a2dec85","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/pulls/21/commits","review_comments_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/pulls/21/comments","review_comment_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/issues/21/comments","statuses_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/statuses/b4e9c3cdba97e804f20960e802c524db66379561","head":{"label":"Shane7:master","ref":"master","sha":"b4e9c3cdba97e804f20960e802c524db66379561","user":{"login":"Shane7","id":6445629,"avatar_url":"https://avatars.githubusercontent.com/u/6445629?v=3","gravatar_id":"","url":"https://api.github.com/users/Shane7","html_url":"https://github.com/Shane7","followers_url":"https://api.github.com/users/Shane7/followers","following_url":"https://api.github.com/users/Shane7/following{/other_user}","gists_url":"https://api.github.com/users/Shane7/gists{/gist_id}","starred_url":"https://api.github.com/users/Shane7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shane7/subscriptions","organizations_url":"https://api.github.com/users/Shane7/orgs","repos_url":"https://api.github.com/users/Shane7/repos","events_url":"https://api.github.com/users/Shane7/events{/privacy}","received_events_url":"https://api.github.com/users/Shane7/received_events","type":"User","site_admin":false},"repo":{"id":63927519,"name":"Camelot-Unchained","full_name":"Shane7/Camelot-Unchained","owner":{"login":"Shane7","id":6445629,"avatar_url":"https://avatars.githubusercontent.com/u/6445629?v=3","gravatar_id":"","url":"https://api.github.com/users/Shane7","html_url":"https://github.com/Shane7","followers_url":"https://api.github.com/users/Shane7/followers","following_url":"https://api.github.com/users/Shane7/following{/other_user}","gists_url":"https://api.github.com/users/Shane7/gists{/gist_id}","starred_url":"https://api.github.com/users/Shane7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shane7/subscriptions","organizations_url":"https://api.github.com/users/Shane7/orgs","repos_url":"https://api.github.com/users/Shane7/repos","events_url":"https://api.github.com/users/Shane7/events{/privacy}","received_events_url":"https://api.github.com/users/Shane7/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Shane7/Camelot-Unchained","description":"UI repository for Camelot Unchained, a tri-realm RvR MMORPG.","fork":true,"url":"https://api.github.com/repos/Shane7/Camelot-Unchained","forks_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/forks","keys_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/teams","hooks_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/hooks","issue_events_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/issues/events{/number}","events_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/events","assignees_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/assignees{/user}","branches_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/branches{/branch}","tags_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/tags","blobs_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/git/refs{/sha}","trees_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/statuses/{sha}","languages_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/languages","stargazers_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/stargazers","contributors_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/contributors","subscribers_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/subscribers","subscription_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/subscription","commits_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/commits{/sha}","git_commits_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/git/commits{/sha}","comments_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/comments{/number}","issue_comment_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/issues/comments{/number}","contents_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/contents/{+path}","compare_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/merges","archive_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/downloads","issues_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/issues{/number}","pulls_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/pulls{/number}","milestones_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/milestones{/number}","notifications_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/labels{/name}","releases_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/releases{/id}","deployments_url":"https://api.github.com/repos/Shane7/Camelot-Unchained/deployments","created_at":"2016-07-22T06:00:54Z","updated_at":"2016-07-22T06:00:56Z","pushed_at":"2016-07-28T06:47:53Z","git_url":"git://github.com/Shane7/Camelot-Unchained.git","ssh_url":"git@github.com:Shane7/Camelot-Unchained.git","clone_url":"https://github.com/Shane7/Camelot-Unchained.git","svn_url":"https://github.com/Shane7/Camelot-Unchained","homepage":null,"size":80744,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"CUModSquad:master","ref":"master","sha":"b7f0e1fde72a4bd62f0da2f0a076d913926e1c92","user":{"login":"CUModSquad","id":13527172,"avatar_url":"https://avatars.githubusercontent.com/u/13527172?v=3","gravatar_id":"","url":"https://api.github.com/users/CUModSquad","html_url":"https://github.com/CUModSquad","followers_url":"https://api.github.com/users/CUModSquad/followers","following_url":"https://api.github.com/users/CUModSquad/following{/other_user}","gists_url":"https://api.github.com/users/CUModSquad/gists{/gist_id}","starred_url":"https://api.github.com/users/CUModSquad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CUModSquad/subscriptions","organizations_url":"https://api.github.com/users/CUModSquad/orgs","repos_url":"https://api.github.com/users/CUModSquad/repos","events_url":"https://api.github.com/users/CUModSquad/events{/privacy}","received_events_url":"https://api.github.com/users/CUModSquad/received_events","type":"Organization","site_admin":false},"repo":{"id":62087037,"name":"Camelot-Unchained","full_name":"CUModSquad/Camelot-Unchained","owner":{"login":"CUModSquad","id":13527172,"avatar_url":"https://avatars.githubusercontent.com/u/13527172?v=3","gravatar_id":"","url":"https://api.github.com/users/CUModSquad","html_url":"https://github.com/CUModSquad","followers_url":"https://api.github.com/users/CUModSquad/followers","following_url":"https://api.github.com/users/CUModSquad/following{/other_user}","gists_url":"https://api.github.com/users/CUModSquad/gists{/gist_id}","starred_url":"https://api.github.com/users/CUModSquad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CUModSquad/subscriptions","organizations_url":"https://api.github.com/users/CUModSquad/orgs","repos_url":"https://api.github.com/users/CUModSquad/repos","events_url":"https://api.github.com/users/CUModSquad/events{/privacy}","received_events_url":"https://api.github.com/users/CUModSquad/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CUModSquad/Camelot-Unchained","description":"UI repository for Camelot Unchained, a tri-realm RvR MMORPG.","fork":true,"url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained","forks_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/forks","keys_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/teams","hooks_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/hooks","issue_events_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/issues/events{/number}","events_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/events","assignees_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/assignees{/user}","branches_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/branches{/branch}","tags_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/tags","blobs_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/git/refs{/sha}","trees_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/statuses/{sha}","languages_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/languages","stargazers_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/stargazers","contributors_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/contributors","subscribers_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/subscribers","subscription_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/subscription","commits_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/commits{/sha}","git_commits_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/git/commits{/sha}","comments_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/comments{/number}","issue_comment_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/issues/comments{/number}","contents_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/contents/{+path}","compare_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/merges","archive_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/downloads","issues_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/issues{/number}","pulls_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/pulls{/number}","milestones_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/milestones{/number}","notifications_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/labels{/name}","releases_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/releases{/id}","deployments_url":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/deployments","created_at":"2016-06-27T20:45:58Z","updated_at":"2016-07-13T04:03:11Z","pushed_at":"2016-07-28T08:55:00Z","git_url":"git://github.com/CUModSquad/Camelot-Unchained.git","ssh_url":"git@github.com:CUModSquad/Camelot-Unchained.git","clone_url":"https://github.com/CUModSquad/Camelot-Unchained.git","svn_url":"https://github.com/CUModSquad/Camelot-Unchained","homepage":null,"size":80660,"stargazers_count":1,"watchers_count":1,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":3,"forks":8,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/pulls/21"},"html":{"href":"https://github.com/CUModSquad/Camelot-Unchained/pull/21"},"issue":{"href":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/issues/21"},"comments":{"href":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/CUModSquad/Camelot-Unchained/statuses/b4e9c3cdba97e804f20960e802c524db66379561"}}}}
{"actor":{"display_login":"Mehuge"}}