{"action":"created","issue":{"url":"https://api.github.com/repos/thorbenprimke/realm-recyclerview/issues/56","repository_url":"https://api.github.com/repos/thorbenprimke/realm-recyclerview","labels_url":"https://api.github.com/repos/thorbenprimke/realm-recyclerview/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/thorbenprimke/realm-recyclerview/issues/56/comments","events_url":"https://api.github.com/repos/thorbenprimke/realm-recyclerview/issues/56/events","html_url":"https://github.com/thorbenprimke/realm-recyclerview/issues/56","id":158499350,"number":56,"title":"EmptyLayout issues while using Footers and/or Headers","user":{"login":"RJFares","id":15612814,"avatar_url":"https://avatars.githubusercontent.com/u/15612814?v=3","gravatar_id":"","url":"https://api.github.com/users/RJFares","html_url":"https://github.com/RJFares","followers_url":"https://api.github.com/users/RJFares/followers","following_url":"https://api.github.com/users/RJFares/following{/other_user}","gists_url":"https://api.github.com/users/RJFares/gists{/gist_id}","starred_url":"https://api.github.com/users/RJFares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RJFares/subscriptions","organizations_url":"https://api.github.com/users/RJFares/orgs","repos_url":"https://api.github.com/users/RJFares/repos","events_url":"https://api.github.com/users/RJFares/events{/privacy}","received_events_url":"https://api.github.com/users/RJFares/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-04T10:48:20Z","updated_at":"2016-06-28T11:36:26Z","closed_at":null,"body":"While using Footers (by addFooter):\r\nThe emptyLayout is never shown even when list size is 0.\r\n\r\nAnother issue I found is when using **Headers**.\r\nIf the list starts from 0 objects and I add objects, let's say by pressing a button, the view does not update and remains empty (with or without an emptyLayout). But when i close and reopen that activity, the list populates, and if we start from a list that already has objects in it, there is no problem. But if I call mRealm.delete(Object.class) and start adding again, the same problems occurs and nothing populates."},"comment":{"url":"https://api.github.com/repos/thorbenprimke/realm-recyclerview/issues/comments/229024344","html_url":"https://github.com/thorbenprimke/realm-recyclerview/issues/56#issuecomment-229024344","issue_url":"https://api.github.com/repos/thorbenprimke/realm-recyclerview/issues/56","id":229024344,"user":{"login":"cwalmsley","id":10227529,"avatar_url":"https://avatars.githubusercontent.com/u/10227529?v=3","gravatar_id":"","url":"https://api.github.com/users/cwalmsley","html_url":"https://github.com/cwalmsley","followers_url":"https://api.github.com/users/cwalmsley/followers","following_url":"https://api.github.com/users/cwalmsley/following{/other_user}","gists_url":"https://api.github.com/users/cwalmsley/gists{/gist_id}","starred_url":"https://api.github.com/users/cwalmsley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwalmsley/subscriptions","organizations_url":"https://api.github.com/users/cwalmsley/orgs","repos_url":"https://api.github.com/users/cwalmsley/repos","events_url":"https://api.github.com/users/cwalmsley/events{/privacy}","received_events_url":"https://api.github.com/users/cwalmsley/received_events","type":"User","site_admin":false},"created_at":"2016-06-28T11:36:26Z","updated_at":"2016-06-28T11:36:26Z","body":"For the second issue (the empty view not being removed when the RealmRecyclerView goes from 0 -> 1 objects), I can confirm from my tests that View.GONE is being set correctly (see snippet below) but for some reason it does not hide the view in the UI. I'm still trying to figure out what is causing this.\r\n\r\n     private void updateEmptyContentContainerVisibility(RecyclerView.Adapter adapter) {\r\n        if (emptyViewId == 0) {\r\n            return;\r\n        }\r\n        emptyContentContainer.setVisibility(\r\n                adapter.getItemCount() == 0 ? View.VISIBLE : View.GONE);\r\n    }"}}
{"actor":{"display_login":"cwalmsley"}}