Check isImportant before incrementing the new messages counter
Don't lose the cursor position when the text field changes height