package com.tencent.mm.pluginsdk.ui.chat;

import android.view.View;
import android.view.View.OnClickListener;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.ui.base.h;
import com.tencent.ytcommon.BuildConfig;

class ChatFooter$4 implements OnClickListener {
    final /* synthetic */ ChatFooter vnX;

    ChatFooter$4(ChatFooter chatFooter) {
        this.vnX = chatFooter;
    }

    public final synchronized void onClick(View view) {
        AppMethodBeat.i(27789);
        String obj = ChatFooter.a(this.vnX).getText().toString();
        ab.i("MicroMsg.ChatFooter", "send msg onClick");
        if (obj.trim().length() != 0 || obj.length() == 0) {
            ChatFooter.b(this.vnX, obj.length());
            if (ChatFooter.i(this.vnX) != null && ChatFooter.i(this.vnX).Qu(obj)) {
                ChatFooter.a(this.vnX).clearComposingText();
                ChatFooter.a(this.vnX).setText(BuildConfig.FLAVOR);
                ChatFooter.l(this.vnX);
            }
            AppMethodBeat.o(27789);
        } else {
            ab.d("MicroMsg.ChatFooter", "empty message cant be sent");
            if (ChatFooter.k(this.vnX) == null || !ChatFooter.k(this.vnX).isShowing()) {
                ChatFooter.a(this.vnX, h.g(this.vnX.getContext(), 2131298089, 2131297061));
                AppMethodBeat.o(27789);
            }
            AppMethodBeat.o(27789);
        }
    }
}
