update ui state when message arrives