This is completely opposite to the truth. The Church dug in its heels against heliocentric astronomy in an astonishingly stubborn way. To an Index Librorum Prohibitorum banning more heliocentric books, Pope Alexander VII appended a small Bull Speculatores Domus to ensure that all further such books were banned by default: “In our apostolic capacity as the vicar of St. Peter, we enjoin all the faithful to renounce and abjure the pernicious Pythagorean doctrine that the Earth is subject to a double motion, a diurnal rotation about its axis and an annual revolution about the Sun.” Embarrassingly, this language (speaking ex cathedra in his official capacity, and commanding a duty to the whole community of believers) fits the criteria later set in the 1st Vatican Council for an “infallible” statement.
The result was that the study of astronomy practically vanished from Portugal, Spain, Italy, and Poland, all countries which had formerly been rather prominent in the field. In France, although it was a Catholic country, the kings never did take dictates from the church, so astronomy persisted; Descartes’ works on physics and astronomy (as well the works on philosophy and analytic geometry we now know him for) were put on a secondary Index, the list of books prohibitum dum corrigendum, but although they were never “corrected” they remained popular in France. The most prominent Italian astronomer of this period, Cassini (discoverer of Titan and the one who figured out what the rings of Saturn were like-- Galileo thought they were like handles on the sides), had to move to Paris to continue his work.
It was difficult for the Church to walk this back. It was not until 1830 that finally an imprimatur was granted for a science book discussing “What modern astronomers believe…” That is, it was permissible to describe modern theories (it was increasingly embarrassing not to be able to teach Newtonian physics in the schools, and of course Newton’s model of the solar system took heliocentrism as a given), but only on the condition that you do not actually say that those things are true, just that others believe them. Later in the 19th century, this weasel-wording fig-leaf was quietly dropped; Leo XIII built an observatory at the Vatican, implicitly telling astronomers they were acceptable again (he was also the Pope who opened up the Vatican Archives to scholars of all faiths and nationalities). The Bellarmine Catechism, which reaffirmed geocentrism in passing while discussing scriptural inerrance (the author, Cardinal Bellarmine, was Galileo’s prosecutor), was dropped in favor of new catechisms, such as the Baltimore Catechism in the US. This caused an uproar of backlash among conservatives who thought that the church was surrendering to Satan by throwing out the old catechism; the next Pope, Pius X, gave Bellarmine the title “Doctor of the Church” which is held by only a handful of others (Aquinas, Augustine, Chrysostom, a couple more less well-known outside church circles) to placate the diehards.
However, Bellarmine’s strict views on scriptural inerrance were gone from Catholic teachings. Bellarmine was sure that Biblical assertions of material fact, like Joshua stopping the Sun, must be believed as firmly as anything more theological-sounding: “It is as blasphemous to deny that Abraham had two sons as to deny that Christ was born of a virgin, for the selfsame Holy Spirit proclaims both.” (Ironically, the Bible actually says Abraham had eight sons: Bellarmine must not have read that after Sarah and Hagar were dead, Abraham married Keturah.) After the change in catechism, the Catholic church refused to be stuck with the dead-literalist fundamentalism that has plagued many of the Protestant denominations in the United States; Catholic scholars have been much more willing than Protestant scholars to view the Bible as a product of fallible humans, doing their best but inevitably getting some things wrong (though the Holy Spirit will make sure we understand things better before any such mistakes cause real problems). In particular, several Popes have made sure to state that the Church has no conflict with the theory of evolution: no way do they want a repeat of the geocentrist debacle.