{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/pulls/comments/151322333","pull_request_review_id":77010936,"id":151322333,"diff_hunk":"@@ -70,6 +70,117 @@ public void Test_AdvancedCollectionView_Filter()\n \n         [TestCategory(\"AdvancedCollectionView\")]\n         [UITestMethod]\n+        public void Test_AdvancedCollectionView_FilterOrder()\n+        {\n+            var l = new ObservableCollection<string>\n+            {\n+                \"lorem\",\n+                \"ipsum\",\n+                \"dolor\",\n+                \"sit\",\n+                \"amet\"\n+            };\n+\n+            var a = new AdvancedCollectionView(l)\n+            {\n+                Filter = (x) => x.ToString().Length < 5\n+            };\n+\n+            a.Insert(4, \"how\");\n+\n+            Assert.AreEqual(3, a.Count);\n+            Assert.AreEqual(\"sit\", a[0]);\n+            Assert.AreEqual(\"how\", a[1]);\n+            Assert.AreEqual(\"amet\", a[2]);\n+\n+        }\n+\n+        [TestCategory(\"AdvancedCollectionView\")]\n+        [UITestMethod]\n+        public void Test_AdvancedCollectionView_FilterInsertDuplicate()\n+        {\n+            var l = new ObservableCollection<string>\n+            {\n+                \"lorem\",\n+                \"ipsum\",\n+                \"dolor\",\n+                \"sit\",\n+                \"amet\"\n+            };\n+\n+            var a = new AdvancedCollectionView(l)\n+            {\n+                Filter = (x) => x.ToString().Length >= 5\n+            };\n+\n+            a.Insert(3, \"ipsum\");\n+\n+            Assert.AreEqual(4, a.Count);\n+            Assert.AreEqual(4, a.Count);\n+            Assert.AreEqual(\"lorem\", a[0]);\n+            Assert.AreEqual(\"ipsum\", a[1]);\n+            Assert.AreEqual(\"dolor\", a[2]);\n+            Assert.AreEqual(\"ipsum\", a[3]);\n+\n+        }\n+\n+        [TestCategory(\"AdvancedCollectionView\")]\n+        [UITestMethod]\n+        public void Test_AdvancedCollectionView_RefreshFilterWithDuplicate()\n+        {\n+            var l = new ObservableCollection<string>\n+            {\n+                \"lorem\",\n+                \"ipsum\",\n+                \"dolor\",\n+                \"sit\",\n+                \"ipsum\",\n+                \"amet\"\n+            };\n+\n+            var a = new AdvancedCollectionView(l)\n+            {\n+                Filter = (x) => x.ToString().Length < 5\n+            };\n+","path":"UnitTests/UI/Test_AdvancedCollectionView.cs","position":19,"original_position":76,"commit_id":"0f335300470b8ca34f8918b5ef5b8efa51edd13f","original_commit_id":"0f335300470b8ca34f8918b5ef5b8efa51edd13f","user":{"login":"michael-hawker","id":24302614,"avatar_url":"https://avatars0.githubusercontent.com/u/24302614?v=4","gravatar_id":"","url":"https://api.github.com/users/michael-hawker","html_url":"https://github.com/michael-hawker","followers_url":"https://api.github.com/users/michael-hawker/followers","following_url":"https://api.github.com/users/michael-hawker/following{/other_user}","gists_url":"https://api.github.com/users/michael-hawker/gists{/gist_id}","starred_url":"https://api.github.com/users/michael-hawker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michael-hawker/subscriptions","organizations_url":"https://api.github.com/users/michael-hawker/orgs","repos_url":"https://api.github.com/users/michael-hawker/repos","events_url":"https://api.github.com/users/michael-hawker/events{/privacy}","received_events_url":"https://api.github.com/users/michael-hawker/received_events","type":"User","site_admin":false},"body":"Again, check initial state after 1st filter.","created_at":"2017-11-16T05:12:45Z","updated_at":"2017-11-16T05:15:25Z","html_url":"https://github.com/Microsoft/UWPCommunityToolkit/pull/1627#discussion_r151322333","pull_request_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/pulls/1627","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/pulls/comments/151322333"},"html":{"href":"https://github.com/Microsoft/UWPCommunityToolkit/pull/1627#discussion_r151322333"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/pulls/1627"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/pulls/1627","id":152831554,"html_url":"https://github.com/Microsoft/UWPCommunityToolkit/pull/1627","diff_url":"https://github.com/Microsoft/UWPCommunityToolkit/pull/1627.diff","patch_url":"https://github.com/Microsoft/UWPCommunityToolkit/pull/1627.patch","issue_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/issues/1627","number":1627,"state":"open","locked":false,"title":"Fix some ACV bugs","user":{"login":"Shayon","id":1694356,"avatar_url":"https://avatars3.githubusercontent.com/u/1694356?v=4","gravatar_id":"","url":"https://api.github.com/users/Shayon","html_url":"https://github.com/Shayon","followers_url":"https://api.github.com/users/Shayon/followers","following_url":"https://api.github.com/users/Shayon/following{/other_user}","gists_url":"https://api.github.com/users/Shayon/gists{/gist_id}","starred_url":"https://api.github.com/users/Shayon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shayon/subscriptions","organizations_url":"https://api.github.com/users/Shayon/orgs","repos_url":"https://api.github.com/users/Shayon/repos","events_url":"https://api.github.com/users/Shayon/events{/privacy}","received_events_url":"https://api.github.com/users/Shayon/received_events","type":"User","site_admin":false},"body":"Fix exception caused by filtering back in removed items using RefreshFilter and Live shaping. Also fix incorrect ordering bug when inserting new items to ACV.\r\n\r\nIssue: #\r\nhttps://github.com/Microsoft/UWPCommunityToolkit/issues/1626\r\n\r\n## PR Type\r\nWhat kind of change does this PR introduce?\r\n\r\n<!-- Please check the one that applies to this PR using \"x\". -->\r\n```\r\n[x] Bugfix\r\n[ ] Feature\r\n[ ] Code style update (formatting)\r\n[ ] Refactoring (no functional changes, no api changes)\r\n[ ] Build or CI related changes\r\n[ ] Documentation content changes\r\n[ ] Sample app changes\r\n[ ] Other... Please describe:\r\n```\r\n\r\n\r\n## What is the current behavior?\r\nhttps://github.com/Microsoft/UWPCommunityToolkit/issues/1626\r\n\r\n\r\n## PR Checklist\r\nPlease check if your PR fulfills the following requirements:\r\n\r\n- [x] Tested code with current [supported SDKs](../readme.md#supported)\r\n- [ ] Docs have been added / updated (for bug fixes / features)\r\n- [ ] Sample in sample app has been added / updated (for bug fixes / features)\r\n- [x] Tests for the changes have been added (for bug fixes / features) (if applicable)\r\n\r\n\r\n## What is the new behavior?\r\nNo exception get's thrown and view respects the ordering of the source when there is no sort applied.\r\n\r\n## Does this PR introduce a breaking change?\r\n```\r\n[ ] Yes\r\n[x] No\r\n```\r\n\r\n<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. \r\n     Please note that breaking changes are likely to be rejected -->","created_at":"2017-11-15T17:02:35Z","updated_at":"2017-11-16T05:15:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9dc55bc9f86e2545fd79c55dc6a3c2d37214d478","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/pulls/1627/commits","review_comments_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/pulls/1627/comments","review_comment_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/issues/1627/comments","statuses_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/statuses/0f335300470b8ca34f8918b5ef5b8efa51edd13f","head":{"label":"Shayon:fix_refilter_bug_and_ordering_bug","ref":"fix_refilter_bug_and_ordering_bug","sha":"0f335300470b8ca34f8918b5ef5b8efa51edd13f","user":{"login":"Shayon","id":1694356,"avatar_url":"https://avatars3.githubusercontent.com/u/1694356?v=4","gravatar_id":"","url":"https://api.github.com/users/Shayon","html_url":"https://github.com/Shayon","followers_url":"https://api.github.com/users/Shayon/followers","following_url":"https://api.github.com/users/Shayon/following{/other_user}","gists_url":"https://api.github.com/users/Shayon/gists{/gist_id}","starred_url":"https://api.github.com/users/Shayon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shayon/subscriptions","organizations_url":"https://api.github.com/users/Shayon/orgs","repos_url":"https://api.github.com/users/Shayon/repos","events_url":"https://api.github.com/users/Shayon/events{/privacy}","received_events_url":"https://api.github.com/users/Shayon/received_events","type":"User","site_admin":false},"repo":{"id":106339156,"name":"UWPCommunityToolkit","full_name":"Shayon/UWPCommunityToolkit","owner":{"login":"Shayon","id":1694356,"avatar_url":"https://avatars3.githubusercontent.com/u/1694356?v=4","gravatar_id":"","url":"https://api.github.com/users/Shayon","html_url":"https://github.com/Shayon","followers_url":"https://api.github.com/users/Shayon/followers","following_url":"https://api.github.com/users/Shayon/following{/other_user}","gists_url":"https://api.github.com/users/Shayon/gists{/gist_id}","starred_url":"https://api.github.com/users/Shayon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shayon/subscriptions","organizations_url":"https://api.github.com/users/Shayon/orgs","repos_url":"https://api.github.com/users/Shayon/repos","events_url":"https://api.github.com/users/Shayon/events{/privacy}","received_events_url":"https://api.github.com/users/Shayon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Shayon/UWPCommunityToolkit","description":"The UWP Community Toolkit is a collection of helper functions, custom controls, and app services. It simplifies and demonstrates common developer tasks building UWP apps for Windows 10. The toolkit is part of the .NET Foundation.","fork":true,"url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit","forks_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/forks","keys_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/teams","hooks_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/hooks","issue_events_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/issues/events{/number}","events_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/events","assignees_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/assignees{/user}","branches_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/branches{/branch}","tags_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/tags","blobs_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/statuses/{sha}","languages_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/languages","stargazers_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/stargazers","contributors_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/contributors","subscribers_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/subscribers","subscription_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/subscription","commits_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/contents/{+path}","compare_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/merges","archive_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/downloads","issues_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/issues{/number}","pulls_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/pulls{/number}","milestones_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/milestones{/number}","notifications_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/labels{/name}","releases_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/releases{/id}","deployments_url":"https://api.github.com/repos/Shayon/UWPCommunityToolkit/deployments","created_at":"2017-10-09T21:52:27Z","updated_at":"2017-10-09T21:52:31Z","pushed_at":"2017-11-15T22:36:46Z","git_url":"git://github.com/Shayon/UWPCommunityToolkit.git","ssh_url":"git@github.com:Shayon/UWPCommunityToolkit.git","clone_url":"https://github.com/Shayon/UWPCommunityToolkit.git","svn_url":"https://github.com/Shayon/UWPCommunityToolkit","homepage":"http://docs.uwpcommunitytoolkit.com","size":286269,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"2e773cedb3eee3d76d0e4822093317863163b98b","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":61403402,"name":"UWPCommunityToolkit","full_name":"Microsoft/UWPCommunityToolkit","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/UWPCommunityToolkit","description":"The UWP Community Toolkit is a collection of helper functions, custom controls, and app services. It simplifies and demonstrates common developer tasks building UWP apps for Windows 10. The toolkit is part of the .NET Foundation.","fork":false,"url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit","forks_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/forks","keys_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/teams","hooks_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/events","assignees_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/tags","blobs_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/languages","stargazers_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/subscription","commits_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/merges","archive_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/downloads","issues_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/deployments","created_at":"2016-06-17T21:29:46Z","updated_at":"2017-11-15T18:44:07Z","pushed_at":"2017-11-16T01:26:01Z","git_url":"git://github.com/Microsoft/UWPCommunityToolkit.git","ssh_url":"git@github.com:Microsoft/UWPCommunityToolkit.git","clone_url":"https://github.com/Microsoft/UWPCommunityToolkit.git","svn_url":"https://github.com/Microsoft/UWPCommunityToolkit","homepage":"http://docs.uwpcommunitytoolkit.com","size":342080,"stargazers_count":1688,"watchers_count":1688,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":524,"mirror_url":null,"archived":false,"open_issues_count":96,"forks":524,"open_issues":96,"watchers":1688,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/pulls/1627"},"html":{"href":"https://github.com/Microsoft/UWPCommunityToolkit/pull/1627"},"issue":{"href":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/issues/1627"},"comments":{"href":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/issues/1627/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/pulls/1627/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/pulls/1627/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/statuses/0f335300470b8ca34f8918b5ef5b8efa51edd13f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"michael-hawker"}}