{"action":"created","comment":{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/pulls/comments/231632313","pull_request_review_id":172643728,"id":231632313,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMTYzMjMxMw==","diff_hunk":"@@ -266,30 +266,54 @@ open class RocketChatViewController: UICollectionViewController {\n \n     open func updateData(with target: [ArraySection<AnyChatSection, AnyChatItem>]) {\n         updateDataQueue.addOperation { [weak self] in\n-            guard\n-                let strongSelf = self,\n-                let collectionView = strongSelf.collectionView\n-            else {\n-                return\n-            }\n+            DispatchQueue.main.async {\n+                guard\n+                    let strongSelf = self,\n+                    let collectionView = strongSelf.collectionView\n+                else {\n+                    return\n+                }\n \n-            let changeset = StagedChangeset(source: strongSelf.internalData, target: target)\n+                let source = strongSelf.internalData\n \n-            DispatchQueue.main.async {\n                 UIView.performWithoutAnimation {\n-                    collectionView.reload(using: changeset, interrupt: { $0.changeCount > 100 }) { newData in\n+                    let changeset = StagedChangeset(source: source, target: target)\n+                    collectionView.reload(using: changeset, interrupt: { $0.changeCount > 100 }) { newData, changes in\n                         strongSelf.internalData = newData\n \n                         let newSections = newData.map { $0.model }\n-                        strongSelf.dataUpdateDelegate?.didUpdateChatData(newData: newSections)\n+                        let updatedItems = strongSelf.updatedItems(from: source, with: changes)\n+\n+                        strongSelf.dataUpdateDelegate?.didUpdateChatData(newData: newSections, updatedItems: updatedItems)\n \n                         assert(newSections.count == newData.count)\n                     }\n                 }\n             }\n         }\n     }\n-}\n+\n+    func updatedItems(from data: [ArraySection<AnyChatSection, AnyChatItem>], with changes: Changeset<[ArraySection<AnyChatSection, AnyChatItem>]>?) -> [AnyHashable] {","path":"Pods/RocketChatViewController/RocketChatViewController/Classes/RocketChatViewController.swift","position":60,"original_position":60,"commit_id":"ad3b7d164c77eda56d4a39f15f5ab67618604100","original_commit_id":"ad3b7d164c77eda56d4a39f15f5ab67618604100","user":{"login":"houndci-bot","id":6697940,"node_id":"MDQ6VXNlcjY2OTc5NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Line Length Violation: Line should be 120 characters or less: currently 167 characters (line_length)","created_at":"2018-11-07T18:51:18Z","updated_at":"2018-11-07T18:51:18Z","html_url":"https://github.com/RocketChat/Rocket.Chat.iOS/pull/2282#discussion_r231632313","pull_request_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/pulls/2282","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/pulls/comments/231632313"},"html":{"href":"https://github.com/RocketChat/Rocket.Chat.iOS/pull/2282#discussion_r231632313"},"pull_request":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/pulls/2282"}}},"pull_request":{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/pulls/2282","id":229131599,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5MTMxNTk5","html_url":"https://github.com/RocketChat/Rocket.Chat.iOS/pull/2282","diff_url":"https://github.com/RocketChat/Rocket.Chat.iOS/pull/2282.diff","patch_url":"https://github.com/RocketChat/Rocket.Chat.iOS/pull/2282.patch","issue_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/issues/2282","number":2282,"state":"open","locked":false,"title":"[FIX] Recalculate sequential messages size when they were not sequential before an update","user":{"login":"filipealva","id":6117280,"node_id":"MDQ6VXNlcjYxMTcyODA=","avatar_url":"https://avatars0.githubusercontent.com/u/6117280?v=4","gravatar_id":"","url":"https://api.github.com/users/filipealva","html_url":"https://github.com/filipealva","followers_url":"https://api.github.com/users/filipealva/followers","following_url":"https://api.github.com/users/filipealva/following{/other_user}","gists_url":"https://api.github.com/users/filipealva/gists{/gist_id}","starred_url":"https://api.github.com/users/filipealva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filipealva/subscriptions","organizations_url":"https://api.github.com/users/filipealva/orgs","repos_url":"https://api.github.com/users/filipealva/repos","events_url":"https://api.github.com/users/filipealva/events{/privacy}","received_events_url":"https://api.github.com/users/filipealva/received_events","type":"User","site_admin":false},"body":"@RocketChat/ios\r\n","created_at":"2018-11-07T18:50:34Z","updated_at":"2018-11-07T18:51:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/pulls/2282/commits","review_comments_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/pulls/2282/comments","review_comment_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/issues/2282/comments","statuses_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/statuses/ad3b7d164c77eda56d4a39f15f5ab67618604100","head":{"label":"RocketChat:fix/recalculate-height-of-updated-items","ref":"fix/recalculate-height-of-updated-items","sha":"ad3b7d164c77eda56d4a39f15f5ab67618604100","user":{"login":"RocketChat","id":12508788,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTA4Nzg4","avatar_url":"https://avatars1.githubusercontent.com/u/12508788?v=4","gravatar_id":"","url":"https://api.github.com/users/RocketChat","html_url":"https://github.com/RocketChat","followers_url":"https://api.github.com/users/RocketChat/followers","following_url":"https://api.github.com/users/RocketChat/following{/other_user}","gists_url":"https://api.github.com/users/RocketChat/gists{/gist_id}","starred_url":"https://api.github.com/users/RocketChat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RocketChat/subscriptions","organizations_url":"https://api.github.com/users/RocketChat/orgs","repos_url":"https://api.github.com/users/RocketChat/repos","events_url":"https://api.github.com/users/RocketChat/events{/privacy}","received_events_url":"https://api.github.com/users/RocketChat/received_events","type":"Organization","site_admin":false},"repo":{"id":40144228,"node_id":"MDEwOlJlcG9zaXRvcnk0MDE0NDIyOA==","name":"Rocket.Chat.iOS","full_name":"RocketChat/Rocket.Chat.iOS","private":false,"owner":{"login":"RocketChat","id":12508788,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTA4Nzg4","avatar_url":"https://avatars1.githubusercontent.com/u/12508788?v=4","gravatar_id":"","url":"https://api.github.com/users/RocketChat","html_url":"https://github.com/RocketChat","followers_url":"https://api.github.com/users/RocketChat/followers","following_url":"https://api.github.com/users/RocketChat/following{/other_user}","gists_url":"https://api.github.com/users/RocketChat/gists{/gist_id}","starred_url":"https://api.github.com/users/RocketChat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RocketChat/subscriptions","organizations_url":"https://api.github.com/users/RocketChat/orgs","repos_url":"https://api.github.com/users/RocketChat/repos","events_url":"https://api.github.com/users/RocketChat/events{/privacy}","received_events_url":"https://api.github.com/users/RocketChat/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/RocketChat/Rocket.Chat.iOS","description":"Rocket.Chat client in Swift for iOS","fork":false,"url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS","forks_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/forks","keys_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/teams","hooks_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/hooks","issue_events_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/issues/events{/number}","events_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/events","assignees_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/assignees{/user}","branches_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/branches{/branch}","tags_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/tags","blobs_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/languages","stargazers_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/stargazers","contributors_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/contributors","subscribers_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/subscribers","subscription_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/subscription","commits_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/contents/{+path}","compare_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/merges","archive_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/downloads","issues_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/issues{/number}","pulls_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/labels{/name}","releases_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/releases{/id}","deployments_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/deployments","created_at":"2015-08-03T19:37:05Z","updated_at":"2018-11-07T16:41:05Z","pushed_at":"2018-11-07T18:50:34Z","git_url":"git://github.com/RocketChat/Rocket.Chat.iOS.git","ssh_url":"git@github.com:RocketChat/Rocket.Chat.iOS.git","clone_url":"https://github.com/RocketChat/Rocket.Chat.iOS.git","svn_url":"https://github.com/RocketChat/Rocket.Chat.iOS","homepage":"https://rocket.chat","size":80009,"stargazers_count":755,"watchers_count":755,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":299,"mirror_url":null,"archived":false,"open_issues_count":108,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":299,"open_issues":108,"watchers":755,"default_branch":"develop"}},"base":{"label":"RocketChat:feature/integrate-rc-view-controller","ref":"feature/integrate-rc-view-controller","sha":"85d10c5ac951dd2a94dc62dfd8e820675dfba438","user":{"login":"RocketChat","id":12508788,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTA4Nzg4","avatar_url":"https://avatars1.githubusercontent.com/u/12508788?v=4","gravatar_id":"","url":"https://api.github.com/users/RocketChat","html_url":"https://github.com/RocketChat","followers_url":"https://api.github.com/users/RocketChat/followers","following_url":"https://api.github.com/users/RocketChat/following{/other_user}","gists_url":"https://api.github.com/users/RocketChat/gists{/gist_id}","starred_url":"https://api.github.com/users/RocketChat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RocketChat/subscriptions","organizations_url":"https://api.github.com/users/RocketChat/orgs","repos_url":"https://api.github.com/users/RocketChat/repos","events_url":"https://api.github.com/users/RocketChat/events{/privacy}","received_events_url":"https://api.github.com/users/RocketChat/received_events","type":"Organization","site_admin":false},"repo":{"id":40144228,"node_id":"MDEwOlJlcG9zaXRvcnk0MDE0NDIyOA==","name":"Rocket.Chat.iOS","full_name":"RocketChat/Rocket.Chat.iOS","private":false,"owner":{"login":"RocketChat","id":12508788,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTA4Nzg4","avatar_url":"https://avatars1.githubusercontent.com/u/12508788?v=4","gravatar_id":"","url":"https://api.github.com/users/RocketChat","html_url":"https://github.com/RocketChat","followers_url":"https://api.github.com/users/RocketChat/followers","following_url":"https://api.github.com/users/RocketChat/following{/other_user}","gists_url":"https://api.github.com/users/RocketChat/gists{/gist_id}","starred_url":"https://api.github.com/users/RocketChat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RocketChat/subscriptions","organizations_url":"https://api.github.com/users/RocketChat/orgs","repos_url":"https://api.github.com/users/RocketChat/repos","events_url":"https://api.github.com/users/RocketChat/events{/privacy}","received_events_url":"https://api.github.com/users/RocketChat/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/RocketChat/Rocket.Chat.iOS","description":"Rocket.Chat client in Swift for iOS","fork":false,"url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS","forks_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/forks","keys_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/teams","hooks_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/hooks","issue_events_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/issues/events{/number}","events_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/events","assignees_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/assignees{/user}","branches_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/branches{/branch}","tags_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/tags","blobs_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/languages","stargazers_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/stargazers","contributors_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/contributors","subscribers_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/subscribers","subscription_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/subscription","commits_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/contents/{+path}","compare_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/merges","archive_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/downloads","issues_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/issues{/number}","pulls_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/labels{/name}","releases_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/releases{/id}","deployments_url":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/deployments","created_at":"2015-08-03T19:37:05Z","updated_at":"2018-11-07T16:41:05Z","pushed_at":"2018-11-07T18:50:34Z","git_url":"git://github.com/RocketChat/Rocket.Chat.iOS.git","ssh_url":"git@github.com:RocketChat/Rocket.Chat.iOS.git","clone_url":"https://github.com/RocketChat/Rocket.Chat.iOS.git","svn_url":"https://github.com/RocketChat/Rocket.Chat.iOS","homepage":"https://rocket.chat","size":80009,"stargazers_count":755,"watchers_count":755,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":299,"mirror_url":null,"archived":false,"open_issues_count":108,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":299,"open_issues":108,"watchers":755,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/pulls/2282"},"html":{"href":"https://github.com/RocketChat/Rocket.Chat.iOS/pull/2282"},"issue":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/issues/2282"},"comments":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/issues/2282/comments"},"review_comments":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/pulls/2282/comments"},"review_comment":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/pulls/2282/commits"},"statuses":{"href":"https://api.github.com/repos/RocketChat/Rocket.Chat.iOS/statuses/ad3b7d164c77eda56d4a39f15f5ab67618604100"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"houndci-bot"}}