A paedophile who had his windows smashed after leaving a note in children’s sweets at a shop asking for naked pictures will spend Christmas behind bars.