If a person makes public an act of worship which was done privately, for example praying the night prayer, then do they lose the reward for it?
We cannot judge this as it depends on the person’s intention and only Allah knows intentions. We do not know why he mentioned his act of worship so we leave these issues.
We need to know that we should protect our acts of worship from showing off or any sayings which can decrease or eliminate the reward, we implement this within our own self. With respect to others, we do not judge their intentions.