Perform changes to UI with or without animations, depending on a variable.