Move mark unread task to use thread IDs