Is she by herself in a shed or a large barn with others. Regardless, the darked you can make the building the flies will pretty much stay out. I hang heavy tarps over the doorway and cover the window on the outside.
she did get hay in there a few minutes after I sprayed though. Is that okay?
I wouldn't stress over it at all. But next time I wouldn't spray where you usually throw her hay or near her bowl. I have fly sprayers in the back of all my stalls....I feed in the front of the stalls. The sprayers spray every 15 mins