Thermal evolution of a flare