The effect of cooling on the accretion of circumprimary discs in merging supermassive black hole binaries