Refactor spinner/loading indicator triggering