Potted plants can be attractive to more than just humans. Fungus gnats find they make an excellent breeding ground. African violets are especially favored, because they grow best in damp soil. Although fungus gnats don't bite or carry disease, they aren't exactly an appealing addition to a home. The larvae also damage plant roots. Unlike other household pests, such as roaches or bedbugs, fungus gnats are not particularly robust. Basic home remedies usually sort the problem.
Allow the top couple of inches of soil around your African violets to dry out between waterings. Allow the soil to dry out completely every couple of weeks. Although African violets like moisture, they are hardy and can tolerate occasional dry spells. Fungus gnat larvae, on the other hand, cannot. Allowing the soil to dry is often sufficient to kill off an infestation.
Mix 1/2 tablespoon of dishwashing liquid with water in a plant mister and spray around the base of the violets. Dishwashing liquid is toxic to gnats and their larvae, which are fragile, but harmless to plants.
Place yellow sticky traps, available from garden centers, on the edges of the pots, if the gnats are still a problem. Alternatively, add a couple of inches of water to yellow plastic cups and distribute near the plants. Fungus gnats are strongly attracted to yellow.