The Messenger of Allah ﷺ said, "The Hour will not come until it is no longer said on earth, 'Allah, Allah.'"In another narration, "The Hour will not come upon anyone who says, 'Allah, Allah.'"
أن رسول الله ﷺ قال: لا تقوم الساعة حتى لا يقال في الأرض: الله، الله. وفي رواية: لا تقوم الساعة على أحد يقول: الله، الله.
Muslim narrated it in the Book of Faith (148) through several chains from Thabit, from Anas, as mentioned. This does not contradict his statement, "A group from my nation will continue to prevail upon the truth until the Day of Judgment," as Muslim also narrated (156) from the hadith of Jabir bin Abdullah. This is because this group fights the Dajjal and gathers with Isa, and they continue in that state until Allah takes them away with the Yemeni wind, which leaves no believer without taking him. What remains after them is the worst of creation, among whom there is no one who says, "Allah, Allah." They mate indiscriminately like donkeys, and upon them the Hour will come. This is what Qurtubi conveyed in al-Mufhim (1/365).