centralize loading_indicator_on logic