Not sure if I was wrong giving an advice

Not sure if I was wrong giving an advice to one of my close friend's, maybe I was harsh or maybe wer are just at different stages in our lives. I'm 27 almost 28, prego 5 months and happily married for 6 years. My friend is same age, has a son he is 5 yrs. She texted me earlier today, to tell me that she quit her job on Tuesday. I asked her why. She said it's because she almost cheated on her current boyfriend. I asked her why. She said because that guy was more mature, cutter and she enjoyed rm talking to him. they went out couple times on dates. She add that she had a job interview next week. She says i just cant believe i almost cheated on him, good thing he forgave me. she said that he saw their text and confronted her. i told her you are always complaining about your current boyfriend that he is too young, inmature, he lives with his parents ; i told her habe you thought of leaving him. she said i tried but each time i try to leave him he cries and begs me to not to do it. i told her well you need to be the adult in this relatioship and leave him. i told her i just cant see how someone in their right mind wants to be someones partner when the other person doesnt feel the same towards them. she stopped talking to me..