Actions are judged by intentions." (Bukhari & Muslim)
馃搶 Relatable: So technically, if you went to the masjid for free AC, but your niyyah switched to prayer... you're still good. 馃槃 Fix the heart, and the deeds follow.