Yeah, I heard some people say that but that would make you refrain from doin the things you love and being happy since you are repressing whatever joy you are feeling at that moment. I do not even entertain this thought. Definitely not for me.
People love you and some people hate you. But that isn't something important in your life. The people we love and love us back are a wonderful gift in life. But the people who hate you aren't and that's okay, because you don't need them to love you.