Updates the ui