{"action":"created","comment":{"url":"https://api.github.com/repos/broskoski/mac.are.na/pulls/comments/165234313","pull_request_review_id":93138826,"id":165234313,"diff_hunk":"@@ -53,22 +54,39 @@ class Main extends Component {\n   // get list of playlists and playlist list length. also attach invert event\n   componentWillMount() {\n     window.addEventListener('keydown', (e) => this.handleInvert(e))\n-\n-    const { activePage, per } = this.state\n-\n     Promise.all([\n       this.API.getBlockCount(),\n-      this.API.getPaginatedChannelContents(activePage, per),\n+      this.API.getChannelContents(),\n     ])\n-      .then(([length, playlists]) => {\n+      .then(([length, playlistChannel]) => {\n+        const resortedPlaylists = {\n+          ...playlistChannel,\n+          contents: playlistChannel.contents.reverse()\n+        }\n         this.setState({\n           playlistListLength: length,\n-          playlists,\n-          maxItemsInCurrentPage: this.getMaxItemsInCurrentPage(length, this.state.per),\n+          playlistChannel: resortedPlaylists,\n+          searchList: playlistChannel,\n         })\n       })\n   }\n \n+  togglePlaylistOrder = (resortedPlaylists) => {\n+    this.setState({ resortedPlaylists: resortedPlaylists.reverse() })\n+  }\n+\n+  applySearch = (predicate) => {\n+    const updatedList = this.state.playlistChannel.contents.filter(item => {\n+      const text = decode(`${item.user.full_name} / ${item.title}`)\n+      return text.toLowerCase().search(predicate) !== -1\n+    })\n+    this.setState({ searchList: { ...this.state.playlistChannel, contents: updatedList } })","path":"src/Main.js","position":79,"original_position":79,"commit_id":"c106e37aa22614255eab2fc858cc39facc5accce","original_commit_id":"c106e37aa22614255eab2fc858cc39facc5accce","user":{"login":"broskoski","id":821469,"avatar_url":"https://avatars0.githubusercontent.com/u/821469?v=4","gravatar_id":"","url":"https://api.github.com/users/broskoski","html_url":"https://github.com/broskoski","followers_url":"https://api.github.com/users/broskoski/followers","following_url":"https://api.github.com/users/broskoski/following{/other_user}","gists_url":"https://api.github.com/users/broskoski/gists{/gist_id}","starred_url":"https://api.github.com/users/broskoski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broskoski/subscriptions","organizations_url":"https://api.github.com/users/broskoski/orgs","repos_url":"https://api.github.com/users/broskoski/repos","events_url":"https://api.github.com/users/broskoski/events{/privacy}","received_events_url":"https://api.github.com/users/broskoski/received_events","type":"User","site_admin":false},"body":"Looks like it just gets replaced here, makes semi-sense to me (set the searchList to the entire channel contents to start)","created_at":"2018-02-01T01:00:26Z","updated_at":"2018-02-01T01:00:26Z","html_url":"https://github.com/broskoski/mac.are.na/pull/25#discussion_r165234313","pull_request_url":"https://api.github.com/repos/broskoski/mac.are.na/pulls/25","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/broskoski/mac.are.na/pulls/comments/165234313"},"html":{"href":"https://github.com/broskoski/mac.are.na/pull/25#discussion_r165234313"},"pull_request":{"href":"https://api.github.com/repos/broskoski/mac.are.na/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/broskoski/mac.are.na/pulls/25","id":166343322,"html_url":"https://github.com/broskoski/mac.are.na/pull/25","diff_url":"https://github.com/broskoski/mac.are.na/pull/25.diff","patch_url":"https://github.com/broskoski/mac.are.na/pull/25.patch","issue_url":"https://api.github.com/repos/broskoski/mac.are.na/issues/25","number":25,"state":"open","locked":false,"title":"Validation with react-payer, return list of rejects at bottom of play…","user":{"login":"gavinpatkinson","id":5265021,"avatar_url":"https://avatars1.githubusercontent.com/u/5265021?v=4","gravatar_id":"","url":"https://api.github.com/users/gavinpatkinson","html_url":"https://github.com/gavinpatkinson","followers_url":"https://api.github.com/users/gavinpatkinson/followers","following_url":"https://api.github.com/users/gavinpatkinson/following{/other_user}","gists_url":"https://api.github.com/users/gavinpatkinson/gists{/gist_id}","starred_url":"https://api.github.com/users/gavinpatkinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gavinpatkinson/subscriptions","organizations_url":"https://api.github.com/users/gavinpatkinson/orgs","repos_url":"https://api.github.com/users/gavinpatkinson/repos","events_url":"https://api.github.com/users/gavinpatkinson/events{/privacy}","received_events_url":"https://api.github.com/users/gavinpatkinson/received_events","type":"User","site_admin":false},"body":"…list\r\n\r\n- [x] validate youtube playlist - grab current track not playlist regex etc\r\n- [x] give validation rejection message on reject track\r\n- [X] use react-player validation\r\n- [x] merge master and fix conflicts\r\n- [x] move search stuff into main state\r\n- [x] playlist title link and style","created_at":"2018-01-31T18:42:29Z","updated_at":"2018-02-01T01:00:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3fa3c2c70700f63295cf3321ba290091f271f1db","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/broskoski/mac.are.na/pulls/25/commits","review_comments_url":"https://api.github.com/repos/broskoski/mac.are.na/pulls/25/comments","review_comment_url":"https://api.github.com/repos/broskoski/mac.are.na/pulls/comments{/number}","comments_url":"https://api.github.com/repos/broskoski/mac.are.na/issues/25/comments","statuses_url":"https://api.github.com/repos/broskoski/mac.are.na/statuses/c106e37aa22614255eab2fc858cc39facc5accce","head":{"label":"broskoski:better-validation","ref":"better-validation","sha":"c106e37aa22614255eab2fc858cc39facc5accce","user":{"login":"broskoski","id":821469,"avatar_url":"https://avatars0.githubusercontent.com/u/821469?v=4","gravatar_id":"","url":"https://api.github.com/users/broskoski","html_url":"https://github.com/broskoski","followers_url":"https://api.github.com/users/broskoski/followers","following_url":"https://api.github.com/users/broskoski/following{/other_user}","gists_url":"https://api.github.com/users/broskoski/gists{/gist_id}","starred_url":"https://api.github.com/users/broskoski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broskoski/subscriptions","organizations_url":"https://api.github.com/users/broskoski/orgs","repos_url":"https://api.github.com/users/broskoski/repos","events_url":"https://api.github.com/users/broskoski/events{/privacy}","received_events_url":"https://api.github.com/users/broskoski/received_events","type":"User","site_admin":false},"repo":{"id":83087015,"name":"mac.are.na","full_name":"broskoski/mac.are.na","owner":{"login":"broskoski","id":821469,"avatar_url":"https://avatars0.githubusercontent.com/u/821469?v=4","gravatar_id":"","url":"https://api.github.com/users/broskoski","html_url":"https://github.com/broskoski","followers_url":"https://api.github.com/users/broskoski/followers","following_url":"https://api.github.com/users/broskoski/following{/other_user}","gists_url":"https://api.github.com/users/broskoski/gists{/gist_id}","starred_url":"https://api.github.com/users/broskoski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broskoski/subscriptions","organizations_url":"https://api.github.com/users/broskoski/orgs","repos_url":"https://api.github.com/users/broskoski/repos","events_url":"https://api.github.com/users/broskoski/events{/privacy}","received_events_url":"https://api.github.com/users/broskoski/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/broskoski/mac.are.na","description":"Are.na channel -> playlist","fork":false,"url":"https://api.github.com/repos/broskoski/mac.are.na","forks_url":"https://api.github.com/repos/broskoski/mac.are.na/forks","keys_url":"https://api.github.com/repos/broskoski/mac.are.na/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broskoski/mac.are.na/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broskoski/mac.are.na/teams","hooks_url":"https://api.github.com/repos/broskoski/mac.are.na/hooks","issue_events_url":"https://api.github.com/repos/broskoski/mac.are.na/issues/events{/number}","events_url":"https://api.github.com/repos/broskoski/mac.are.na/events","assignees_url":"https://api.github.com/repos/broskoski/mac.are.na/assignees{/user}","branches_url":"https://api.github.com/repos/broskoski/mac.are.na/branches{/branch}","tags_url":"https://api.github.com/repos/broskoski/mac.are.na/tags","blobs_url":"https://api.github.com/repos/broskoski/mac.are.na/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broskoski/mac.are.na/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broskoski/mac.are.na/git/refs{/sha}","trees_url":"https://api.github.com/repos/broskoski/mac.are.na/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broskoski/mac.are.na/statuses/{sha}","languages_url":"https://api.github.com/repos/broskoski/mac.are.na/languages","stargazers_url":"https://api.github.com/repos/broskoski/mac.are.na/stargazers","contributors_url":"https://api.github.com/repos/broskoski/mac.are.na/contributors","subscribers_url":"https://api.github.com/repos/broskoski/mac.are.na/subscribers","subscription_url":"https://api.github.com/repos/broskoski/mac.are.na/subscription","commits_url":"https://api.github.com/repos/broskoski/mac.are.na/commits{/sha}","git_commits_url":"https://api.github.com/repos/broskoski/mac.are.na/git/commits{/sha}","comments_url":"https://api.github.com/repos/broskoski/mac.are.na/comments{/number}","issue_comment_url":"https://api.github.com/repos/broskoski/mac.are.na/issues/comments{/number}","contents_url":"https://api.github.com/repos/broskoski/mac.are.na/contents/{+path}","compare_url":"https://api.github.com/repos/broskoski/mac.are.na/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broskoski/mac.are.na/merges","archive_url":"https://api.github.com/repos/broskoski/mac.are.na/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broskoski/mac.are.na/downloads","issues_url":"https://api.github.com/repos/broskoski/mac.are.na/issues{/number}","pulls_url":"https://api.github.com/repos/broskoski/mac.are.na/pulls{/number}","milestones_url":"https://api.github.com/repos/broskoski/mac.are.na/milestones{/number}","notifications_url":"https://api.github.com/repos/broskoski/mac.are.na/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broskoski/mac.are.na/labels{/name}","releases_url":"https://api.github.com/repos/broskoski/mac.are.na/releases{/id}","deployments_url":"https://api.github.com/repos/broskoski/mac.are.na/deployments","created_at":"2017-02-24T22:10:33Z","updated_at":"2018-01-31T03:18:24Z","pushed_at":"2018-02-01T00:50:05Z","git_url":"git://github.com/broskoski/mac.are.na.git","ssh_url":"git@github.com:broskoski/mac.are.na.git","clone_url":"https://github.com/broskoski/mac.are.na.git","svn_url":"https://github.com/broskoski/mac.are.na","homepage":null,"size":231,"stargazers_count":12,"watchers_count":12,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":2,"open_issues":5,"watchers":12,"default_branch":"master"}},"base":{"label":"broskoski:master","ref":"master","sha":"8abe4bf043e9a9f7ca5673b8298224716a73ae97","user":{"login":"broskoski","id":821469,"avatar_url":"https://avatars0.githubusercontent.com/u/821469?v=4","gravatar_id":"","url":"https://api.github.com/users/broskoski","html_url":"https://github.com/broskoski","followers_url":"https://api.github.com/users/broskoski/followers","following_url":"https://api.github.com/users/broskoski/following{/other_user}","gists_url":"https://api.github.com/users/broskoski/gists{/gist_id}","starred_url":"https://api.github.com/users/broskoski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broskoski/subscriptions","organizations_url":"https://api.github.com/users/broskoski/orgs","repos_url":"https://api.github.com/users/broskoski/repos","events_url":"https://api.github.com/users/broskoski/events{/privacy}","received_events_url":"https://api.github.com/users/broskoski/received_events","type":"User","site_admin":false},"repo":{"id":83087015,"name":"mac.are.na","full_name":"broskoski/mac.are.na","owner":{"login":"broskoski","id":821469,"avatar_url":"https://avatars0.githubusercontent.com/u/821469?v=4","gravatar_id":"","url":"https://api.github.com/users/broskoski","html_url":"https://github.com/broskoski","followers_url":"https://api.github.com/users/broskoski/followers","following_url":"https://api.github.com/users/broskoski/following{/other_user}","gists_url":"https://api.github.com/users/broskoski/gists{/gist_id}","starred_url":"https://api.github.com/users/broskoski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broskoski/subscriptions","organizations_url":"https://api.github.com/users/broskoski/orgs","repos_url":"https://api.github.com/users/broskoski/repos","events_url":"https://api.github.com/users/broskoski/events{/privacy}","received_events_url":"https://api.github.com/users/broskoski/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/broskoski/mac.are.na","description":"Are.na channel -> playlist","fork":false,"url":"https://api.github.com/repos/broskoski/mac.are.na","forks_url":"https://api.github.com/repos/broskoski/mac.are.na/forks","keys_url":"https://api.github.com/repos/broskoski/mac.are.na/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broskoski/mac.are.na/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broskoski/mac.are.na/teams","hooks_url":"https://api.github.com/repos/broskoski/mac.are.na/hooks","issue_events_url":"https://api.github.com/repos/broskoski/mac.are.na/issues/events{/number}","events_url":"https://api.github.com/repos/broskoski/mac.are.na/events","assignees_url":"https://api.github.com/repos/broskoski/mac.are.na/assignees{/user}","branches_url":"https://api.github.com/repos/broskoski/mac.are.na/branches{/branch}","tags_url":"https://api.github.com/repos/broskoski/mac.are.na/tags","blobs_url":"https://api.github.com/repos/broskoski/mac.are.na/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broskoski/mac.are.na/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broskoski/mac.are.na/git/refs{/sha}","trees_url":"https://api.github.com/repos/broskoski/mac.are.na/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broskoski/mac.are.na/statuses/{sha}","languages_url":"https://api.github.com/repos/broskoski/mac.are.na/languages","stargazers_url":"https://api.github.com/repos/broskoski/mac.are.na/stargazers","contributors_url":"https://api.github.com/repos/broskoski/mac.are.na/contributors","subscribers_url":"https://api.github.com/repos/broskoski/mac.are.na/subscribers","subscription_url":"https://api.github.com/repos/broskoski/mac.are.na/subscription","commits_url":"https://api.github.com/repos/broskoski/mac.are.na/commits{/sha}","git_commits_url":"https://api.github.com/repos/broskoski/mac.are.na/git/commits{/sha}","comments_url":"https://api.github.com/repos/broskoski/mac.are.na/comments{/number}","issue_comment_url":"https://api.github.com/repos/broskoski/mac.are.na/issues/comments{/number}","contents_url":"https://api.github.com/repos/broskoski/mac.are.na/contents/{+path}","compare_url":"https://api.github.com/repos/broskoski/mac.are.na/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broskoski/mac.are.na/merges","archive_url":"https://api.github.com/repos/broskoski/mac.are.na/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broskoski/mac.are.na/downloads","issues_url":"https://api.github.com/repos/broskoski/mac.are.na/issues{/number}","pulls_url":"https://api.github.com/repos/broskoski/mac.are.na/pulls{/number}","milestones_url":"https://api.github.com/repos/broskoski/mac.are.na/milestones{/number}","notifications_url":"https://api.github.com/repos/broskoski/mac.are.na/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broskoski/mac.are.na/labels{/name}","releases_url":"https://api.github.com/repos/broskoski/mac.are.na/releases{/id}","deployments_url":"https://api.github.com/repos/broskoski/mac.are.na/deployments","created_at":"2017-02-24T22:10:33Z","updated_at":"2018-01-31T03:18:24Z","pushed_at":"2018-02-01T00:50:05Z","git_url":"git://github.com/broskoski/mac.are.na.git","ssh_url":"git@github.com:broskoski/mac.are.na.git","clone_url":"https://github.com/broskoski/mac.are.na.git","svn_url":"https://github.com/broskoski/mac.are.na","homepage":null,"size":231,"stargazers_count":12,"watchers_count":12,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":2,"open_issues":5,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/broskoski/mac.are.na/pulls/25"},"html":{"href":"https://github.com/broskoski/mac.are.na/pull/25"},"issue":{"href":"https://api.github.com/repos/broskoski/mac.are.na/issues/25"},"comments":{"href":"https://api.github.com/repos/broskoski/mac.are.na/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/broskoski/mac.are.na/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/broskoski/mac.are.na/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/broskoski/mac.are.na/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/broskoski/mac.are.na/statuses/c106e37aa22614255eab2fc858cc39facc5accce"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"broskoski"}}