Here's how I read it:
1. Trump asks Comey to stop the investigation because it's creating bad press and is undermining the goals of his administration
2. Comey doesn't
3. Trump fires Comey for disloyalty and for allowing what Trump sees as a distraction to worsen, not because he believes the firing will somehow end the investigation.
4. What you said, though specifically because Comey's actions showed disloyalty and created problems for administration vs an effort to deliberately "obstruct justice"