Contact list displays trashed items - this PR fixes it
Trashed
Create multiple articles and contacts.
Create two menu items for "Articles » Category List" and "Contacts » List Contacts in a Category"
Trash one article and one contact
Check the menus - the trashed items do not appear
Login to the frontend as admin (or anyone with Special access)
Check the article menu - the trashed article does not appear
Check the contact menu - the trashed contact does appear
Unpublished
Create multiple articles and contacts.
Create two menu items for "Articles » Category List" and "Contacts » List Contacts in a Category"
Unpublish one article and one contact
Check the menus - the unpublished items do not appear
Login to the frontend as admin (or anyone with Special access)
Check the article menu - the unpublished article does appear with a flag saying unpublished
Check the contact menu - the unpublished contact does appear with a flag saying unpublished
There is a small issue with the code where you set the state.
You set it as an array, but that will not do anything because the code will only act on the state if it is numeric, an array is ignored as an invalid state.
That's probably because you copied it from ContentModelCategory, that one in the end uses ContentModelArticles which supports an array in the state.
You can just remove the lines which set the state (286-289). It will work exactly the same.
test good