{"action":"created","comment":{"url":"https://api.github.com/repos/purebred-mua/purebred/pulls/comments/155703890","pull_request_review_id":82067016,"id":155703890,"diff_hunk":"@@ -388,8 +390,22 @@ removeTags ts =\n reloadList :: Action 'BrowseThreads AppState\n reloadList = Action \"reload list of threads\" applySearch\n \n+selectNextUnread :: Action 'BrowseMail AppState\n+selectNextUnread =\n+  Action { _aDescription = \"select next unread\"\n+         , _aAction = (\\s -> let vec = (view (asMailIndex . miListOfMails . L.listElementsL) s)\n+                                 cur = (view (asMailIndex . miListOfMails . L.listSelectedL) s) <|> Just 0\n+                                 fx m = Notmuch.hasTag (view (asConfig . confNotmuch . nmNewTag) s) m\n+                                 next = nextUnread vec cur fx\n+                             in pure $ over (asMailIndex . miListOfMails) (L.listMoveTo (fromMaybe 0 next)) s)\n+         }\n+\n -- Function definitions for actions\n --\n+-- | Return the next unread item or default to the currently selected.\n+nextUnread :: Vector.Vector a -> Maybe Int -> (a -> Bool) -> Maybe Int\n+nextUnread vec cur fx = Vector.findIndex fx (Vector.drop ((fromMaybe 0 cur) + 1) vec) <|> cur","path":"src/UI/Actions.hs","position":null,"original_position":64,"commit_id":"6d6998edcc02046e2000f5b6c534b573b7586097","original_commit_id":"c9f49469b6c5702edb010b10edcad51fc5df7571","user":{"login":"romanofski","id":121047,"avatar_url":"https://avatars3.githubusercontent.com/u/121047?v=4","gravatar_id":"","url":"https://api.github.com/users/romanofski","html_url":"https://github.com/romanofski","followers_url":"https://api.github.com/users/romanofski/followers","following_url":"https://api.github.com/users/romanofski/following{/other_user}","gists_url":"https://api.github.com/users/romanofski/gists{/gist_id}","starred_url":"https://api.github.com/users/romanofski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romanofski/subscriptions","organizations_url":"https://api.github.com/users/romanofski/orgs","repos_url":"https://api.github.com/users/romanofski/repos","events_url":"https://api.github.com/users/romanofski/events{/privacy}","received_events_url":"https://api.github.com/users/romanofski/received_events","type":"User","site_admin":false},"body":"Alright got this in. I'll try to find a property to maybe test this.","created_at":"2017-12-08T04:58:05Z","updated_at":"2017-12-08T04:58:05Z","html_url":"https://github.com/purebred-mua/purebred/pull/116#discussion_r155703890","pull_request_url":"https://api.github.com/repos/purebred-mua/purebred/pulls/116","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/purebred-mua/purebred/pulls/comments/155703890"},"html":{"href":"https://github.com/purebred-mua/purebred/pull/116#discussion_r155703890"},"pull_request":{"href":"https://api.github.com/repos/purebred-mua/purebred/pulls/116"}},"in_reply_to_id":155441567},"pull_request":{"url":"https://api.github.com/repos/purebred-mua/purebred/pulls/116","id":156657881,"html_url":"https://github.com/purebred-mua/purebred/pull/116","diff_url":"https://github.com/purebred-mua/purebred/pull/116.diff","patch_url":"https://github.com/purebred-mua/purebred/pull/116.patch","issue_url":"https://api.github.com/repos/purebred-mua/purebred/issues/116","number":116,"state":"open","locked":false,"title":"Select next unread","user":{"login":"romanofski","id":121047,"avatar_url":"https://avatars3.githubusercontent.com/u/121047?v=4","gravatar_id":"","url":"https://api.github.com/users/romanofski","html_url":"https://github.com/romanofski","followers_url":"https://api.github.com/users/romanofski/followers","following_url":"https://api.github.com/users/romanofski/following{/other_user}","gists_url":"https://api.github.com/users/romanofski/gists{/gist_id}","starred_url":"https://api.github.com/users/romanofski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romanofski/subscriptions","organizations_url":"https://api.github.com/users/romanofski/orgs","repos_url":"https://api.github.com/users/romanofski/repos","events_url":"https://api.github.com/users/romanofski/events{/privacy}","received_events_url":"https://api.github.com/users/romanofski/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-12-06T07:22:52Z","updated_at":"2017-12-08T04:58:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"55306ae04a283019eac8774f7defcb4b032b8428","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/purebred-mua/purebred/pulls/116/commits","review_comments_url":"https://api.github.com/repos/purebred-mua/purebred/pulls/116/comments","review_comment_url":"https://api.github.com/repos/purebred-mua/purebred/pulls/comments{/number}","comments_url":"https://api.github.com/repos/purebred-mua/purebred/issues/116/comments","statuses_url":"https://api.github.com/repos/purebred-mua/purebred/statuses/6d6998edcc02046e2000f5b6c534b573b7586097","head":{"label":"purebred-mua:select_next_unread","ref":"select_next_unread","sha":"6d6998edcc02046e2000f5b6c534b573b7586097","user":{"login":"purebred-mua","id":30308388,"avatar_url":"https://avatars3.githubusercontent.com/u/30308388?v=4","gravatar_id":"","url":"https://api.github.com/users/purebred-mua","html_url":"https://github.com/purebred-mua","followers_url":"https://api.github.com/users/purebred-mua/followers","following_url":"https://api.github.com/users/purebred-mua/following{/other_user}","gists_url":"https://api.github.com/users/purebred-mua/gists{/gist_id}","starred_url":"https://api.github.com/users/purebred-mua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/purebred-mua/subscriptions","organizations_url":"https://api.github.com/users/purebred-mua/orgs","repos_url":"https://api.github.com/users/purebred-mua/repos","events_url":"https://api.github.com/users/purebred-mua/events{/privacy}","received_events_url":"https://api.github.com/users/purebred-mua/received_events","type":"Organization","site_admin":false},"repo":{"id":97552969,"name":"purebred","full_name":"purebred-mua/purebred","owner":{"login":"purebred-mua","id":30308388,"avatar_url":"https://avatars3.githubusercontent.com/u/30308388?v=4","gravatar_id":"","url":"https://api.github.com/users/purebred-mua","html_url":"https://github.com/purebred-mua","followers_url":"https://api.github.com/users/purebred-mua/followers","following_url":"https://api.github.com/users/purebred-mua/following{/other_user}","gists_url":"https://api.github.com/users/purebred-mua/gists{/gist_id}","starred_url":"https://api.github.com/users/purebred-mua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/purebred-mua/subscriptions","organizations_url":"https://api.github.com/users/purebred-mua/orgs","repos_url":"https://api.github.com/users/purebred-mua/repos","events_url":"https://api.github.com/users/purebred-mua/events{/privacy}","received_events_url":"https://api.github.com/users/purebred-mua/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/purebred-mua/purebred","description":"A terminal based mail user agent based on notmuch","fork":false,"url":"https://api.github.com/repos/purebred-mua/purebred","forks_url":"https://api.github.com/repos/purebred-mua/purebred/forks","keys_url":"https://api.github.com/repos/purebred-mua/purebred/keys{/key_id}","collaborators_url":"https://api.github.com/repos/purebred-mua/purebred/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/purebred-mua/purebred/teams","hooks_url":"https://api.github.com/repos/purebred-mua/purebred/hooks","issue_events_url":"https://api.github.com/repos/purebred-mua/purebred/issues/events{/number}","events_url":"https://api.github.com/repos/purebred-mua/purebred/events","assignees_url":"https://api.github.com/repos/purebred-mua/purebred/assignees{/user}","branches_url":"https://api.github.com/repos/purebred-mua/purebred/branches{/branch}","tags_url":"https://api.github.com/repos/purebred-mua/purebred/tags","blobs_url":"https://api.github.com/repos/purebred-mua/purebred/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/purebred-mua/purebred/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/purebred-mua/purebred/git/refs{/sha}","trees_url":"https://api.github.com/repos/purebred-mua/purebred/git/trees{/sha}","statuses_url":"https://api.github.com/repos/purebred-mua/purebred/statuses/{sha}","languages_url":"https://api.github.com/repos/purebred-mua/purebred/languages","stargazers_url":"https://api.github.com/repos/purebred-mua/purebred/stargazers","contributors_url":"https://api.github.com/repos/purebred-mua/purebred/contributors","subscribers_url":"https://api.github.com/repos/purebred-mua/purebred/subscribers","subscription_url":"https://api.github.com/repos/purebred-mua/purebred/subscription","commits_url":"https://api.github.com/repos/purebred-mua/purebred/commits{/sha}","git_commits_url":"https://api.github.com/repos/purebred-mua/purebred/git/commits{/sha}","comments_url":"https://api.github.com/repos/purebred-mua/purebred/comments{/number}","issue_comment_url":"https://api.github.com/repos/purebred-mua/purebred/issues/comments{/number}","contents_url":"https://api.github.com/repos/purebred-mua/purebred/contents/{+path}","compare_url":"https://api.github.com/repos/purebred-mua/purebred/compare/{base}...{head}","merges_url":"https://api.github.com/repos/purebred-mua/purebred/merges","archive_url":"https://api.github.com/repos/purebred-mua/purebred/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/purebred-mua/purebred/downloads","issues_url":"https://api.github.com/repos/purebred-mua/purebred/issues{/number}","pulls_url":"https://api.github.com/repos/purebred-mua/purebred/pulls{/number}","milestones_url":"https://api.github.com/repos/purebred-mua/purebred/milestones{/number}","notifications_url":"https://api.github.com/repos/purebred-mua/purebred/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/purebred-mua/purebred/labels{/name}","releases_url":"https://api.github.com/repos/purebred-mua/purebred/releases{/id}","deployments_url":"https://api.github.com/repos/purebred-mua/purebred/deployments","created_at":"2017-07-18T04:34:12Z","updated_at":"2017-12-04T20:21:05Z","pushed_at":"2017-12-08T04:57:17Z","git_url":"git://github.com/purebred-mua/purebred.git","ssh_url":"git@github.com:purebred-mua/purebred.git","clone_url":"https://github.com/purebred-mua/purebred.git","svn_url":"https://github.com/purebred-mua/purebred","homepage":"","size":417,"stargazers_count":12,"watchers_count":12,"language":"Haskell","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":35,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":1,"open_issues":35,"watchers":12,"default_branch":"master"}},"base":{"label":"purebred-mua:master","ref":"master","sha":"214f2f433325da2f3df229778afcb26c61d8c614","user":{"login":"purebred-mua","id":30308388,"avatar_url":"https://avatars3.githubusercontent.com/u/30308388?v=4","gravatar_id":"","url":"https://api.github.com/users/purebred-mua","html_url":"https://github.com/purebred-mua","followers_url":"https://api.github.com/users/purebred-mua/followers","following_url":"https://api.github.com/users/purebred-mua/following{/other_user}","gists_url":"https://api.github.com/users/purebred-mua/gists{/gist_id}","starred_url":"https://api.github.com/users/purebred-mua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/purebred-mua/subscriptions","organizations_url":"https://api.github.com/users/purebred-mua/orgs","repos_url":"https://api.github.com/users/purebred-mua/repos","events_url":"https://api.github.com/users/purebred-mua/events{/privacy}","received_events_url":"https://api.github.com/users/purebred-mua/received_events","type":"Organization","site_admin":false},"repo":{"id":97552969,"name":"purebred","full_name":"purebred-mua/purebred","owner":{"login":"purebred-mua","id":30308388,"avatar_url":"https://avatars3.githubusercontent.com/u/30308388?v=4","gravatar_id":"","url":"https://api.github.com/users/purebred-mua","html_url":"https://github.com/purebred-mua","followers_url":"https://api.github.com/users/purebred-mua/followers","following_url":"https://api.github.com/users/purebred-mua/following{/other_user}","gists_url":"https://api.github.com/users/purebred-mua/gists{/gist_id}","starred_url":"https://api.github.com/users/purebred-mua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/purebred-mua/subscriptions","organizations_url":"https://api.github.com/users/purebred-mua/orgs","repos_url":"https://api.github.com/users/purebred-mua/repos","events_url":"https://api.github.com/users/purebred-mua/events{/privacy}","received_events_url":"https://api.github.com/users/purebred-mua/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/purebred-mua/purebred","description":"A terminal based mail user agent based on notmuch","fork":false,"url":"https://api.github.com/repos/purebred-mua/purebred","forks_url":"https://api.github.com/repos/purebred-mua/purebred/forks","keys_url":"https://api.github.com/repos/purebred-mua/purebred/keys{/key_id}","collaborators_url":"https://api.github.com/repos/purebred-mua/purebred/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/purebred-mua/purebred/teams","hooks_url":"https://api.github.com/repos/purebred-mua/purebred/hooks","issue_events_url":"https://api.github.com/repos/purebred-mua/purebred/issues/events{/number}","events_url":"https://api.github.com/repos/purebred-mua/purebred/events","assignees_url":"https://api.github.com/repos/purebred-mua/purebred/assignees{/user}","branches_url":"https://api.github.com/repos/purebred-mua/purebred/branches{/branch}","tags_url":"https://api.github.com/repos/purebred-mua/purebred/tags","blobs_url":"https://api.github.com/repos/purebred-mua/purebred/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/purebred-mua/purebred/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/purebred-mua/purebred/git/refs{/sha}","trees_url":"https://api.github.com/repos/purebred-mua/purebred/git/trees{/sha}","statuses_url":"https://api.github.com/repos/purebred-mua/purebred/statuses/{sha}","languages_url":"https://api.github.com/repos/purebred-mua/purebred/languages","stargazers_url":"https://api.github.com/repos/purebred-mua/purebred/stargazers","contributors_url":"https://api.github.com/repos/purebred-mua/purebred/contributors","subscribers_url":"https://api.github.com/repos/purebred-mua/purebred/subscribers","subscription_url":"https://api.github.com/repos/purebred-mua/purebred/subscription","commits_url":"https://api.github.com/repos/purebred-mua/purebred/commits{/sha}","git_commits_url":"https://api.github.com/repos/purebred-mua/purebred/git/commits{/sha}","comments_url":"https://api.github.com/repos/purebred-mua/purebred/comments{/number}","issue_comment_url":"https://api.github.com/repos/purebred-mua/purebred/issues/comments{/number}","contents_url":"https://api.github.com/repos/purebred-mua/purebred/contents/{+path}","compare_url":"https://api.github.com/repos/purebred-mua/purebred/compare/{base}...{head}","merges_url":"https://api.github.com/repos/purebred-mua/purebred/merges","archive_url":"https://api.github.com/repos/purebred-mua/purebred/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/purebred-mua/purebred/downloads","issues_url":"https://api.github.com/repos/purebred-mua/purebred/issues{/number}","pulls_url":"https://api.github.com/repos/purebred-mua/purebred/pulls{/number}","milestones_url":"https://api.github.com/repos/purebred-mua/purebred/milestones{/number}","notifications_url":"https://api.github.com/repos/purebred-mua/purebred/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/purebred-mua/purebred/labels{/name}","releases_url":"https://api.github.com/repos/purebred-mua/purebred/releases{/id}","deployments_url":"https://api.github.com/repos/purebred-mua/purebred/deployments","created_at":"2017-07-18T04:34:12Z","updated_at":"2017-12-04T20:21:05Z","pushed_at":"2017-12-08T04:57:17Z","git_url":"git://github.com/purebred-mua/purebred.git","ssh_url":"git@github.com:purebred-mua/purebred.git","clone_url":"https://github.com/purebred-mua/purebred.git","svn_url":"https://github.com/purebred-mua/purebred","homepage":"","size":417,"stargazers_count":12,"watchers_count":12,"language":"Haskell","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":35,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":1,"open_issues":35,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/purebred-mua/purebred/pulls/116"},"html":{"href":"https://github.com/purebred-mua/purebred/pull/116"},"issue":{"href":"https://api.github.com/repos/purebred-mua/purebred/issues/116"},"comments":{"href":"https://api.github.com/repos/purebred-mua/purebred/issues/116/comments"},"review_comments":{"href":"https://api.github.com/repos/purebred-mua/purebred/pulls/116/comments"},"review_comment":{"href":"https://api.github.com/repos/purebred-mua/purebred/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/purebred-mua/purebred/pulls/116/commits"},"statuses":{"href":"https://api.github.com/repos/purebred-mua/purebred/statuses/6d6998edcc02046e2000f5b6c534b573b7586097"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"romanofski"}}