Fix num_unread*2 on minimized chat

When chat was minimized the counter num_unread of unread message was increment when receiving a compose message so the number of unread messages was doubled.