Its great the your girl informed you about the situation instead of losing herself due to emotions. You gave the great piece of advice and got her the best motivational message. Well done!
Yeah she is right. You deserve better than the guy who ditch you. Because he lost trustworthy relation neither you.