Refactor filter state checkbox update code for readability

Small change that makes the logic for the update of the 'incomplete' and 'complete' checkboxes clearer.