Flies actually have great sight, after all a fly’s eyes are composed of thousands of lenses. They can detect even the slightest movement, which makes them so hard to swat. Some flies even have very accurate 3D vision. To put it into perspective humans do not see in 3D with one eye, one eye can only see 2 dimensions. We have two eyes so that we can get two images which our minds then use to give us an indication of depth.
Since flies detect such a large amount of movement it is unlikely that they are able to see very far. If they could see more than a few meters they would see so much that their little tiny fly brains wouldn’t be able to comprehend everything that is happening around them. The flies eye is as complex as it is for survival, there is no need for a fly to see something that is 20 meters away since it would not pose a threat.