Actually, the Ottomans were far more accommodating of religious diversity than the Kemalists who founded modern Turkey. Although Christians and Jews lived in dhimmitude, they were allowed to run their own affairs and were generally left alone, provided they did not get involved in nationalist scheming. Sure Hagia Sophia was made into a mosque, along with a number of others in Constantinople--back in the 15th century. Thereafter, the Turks generally left Orthodox churches to the Orthodox--unless the local Orthodox community got in their bad books and needed to be punished.
Hagia Sophia was well maintained as a mosque, but allowed to deteriorate once the Kamalists turned it into a museum. And the secularist Turkish government, in its suspicion of all religion, closed down far more Greek seminaries, schools, monasteries and churches than the Ottomans had.