Make sure local unread items are in sync with what comes from the server. Fixes #118.