Change badge color based on whether there are active tasks or not. Centralize badge updating