boyfriend talking to another girl

In my school my boyfriend started to flirt with another girl. It made me uncomfortable, so I immediately talked to him about it. He admited that he was flirting, but that it didint mean anything and he just flirted cause "it's a fun thing to do". So I let it go. Now months later after them flirting a little more I snooped on his phone (yes I'm ashamed I never do that) and I found long texts between them. He was definitely flirting with her more and asking for her Snapchat. She was going through a hard time and he was being there for her emotionally. I know he was trying to be a good friend, but it seemed to cross the line a little bit. He also neglected to tell me that they were even talking or thinking about hanging out. I feel like I'm over reacting, but I can't tell if he's just trying to be a good friend or he wants her. I don't know weather or not I should end it. Please comment and tell me what to do!