diff --git a/live/src/main/java/com/yunbao/live/activity/LiveActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveActivity.java index d5571c190..985bd667a 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveActivity.java @@ -79,7 +79,6 @@ import com.yunbao.live.socket.SocketMessageListener; import com.yunbao.live.socket.SocketRyChatUtil; import com.yunbao.live.socket.SocketRyClient; import com.yunbao.live.utils.LoadDian9TuUtil; -import com.yunbao.live.utils.UnzipFromAssets; import com.yunbao.live.views.AbsLiveViewHolder; import com.yunbao.live.views.LiveAddImpressViewHolder; import com.yunbao.live.views.LiveAdminListViewHolder; @@ -93,12 +92,10 @@ import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; -import java.io.File; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.List; -import java.util.Objects; /** * Created by cxf on 2018/10/7. @@ -706,7 +703,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL * 主播与主播PK 所有人收到PK开始的回调 */ @Override - public void onLinkMicPkStart(final String pkUid, final String pkhead, final String pkname,String isLadders) { + public void onLinkMicPkStart(final String pkUid, final String pkhead, final String pkname, String isLadders) { Log.e("ry", "pkUid" + pkUid + "pkhead" + pkhead + "pkname" + pkname); if (mLiveRyLinkMicPkPresenter != null && mLiveRoomViewHolder != null) { mLiveRyLinkMicPkPresenter.onLinkMicPkStart(pkUid, 1); @@ -942,6 +939,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL * 发 聊天 消息 */ public void sendChatMessage(String content, String atUserID, String atUserName) { + if (TextUtils.isEmpty(content)) return; if (!mIsAnchor) { UserBean u = CommonAppConfig.getInstance().getUserBean(); if (u != null && u.getLevel() < mChatLevel) { @@ -1215,7 +1213,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL Bundle bundle = new Bundle(); bundle.putString(Constants.LIVE_UID, mLiveUid); bundle.putBoolean(Constants.ANCHOR, mIsAnchor); - bundle.putBoolean("showBuyView",!showBuyView); + bundle.putBoolean("showBuyView", !showBuyView); fragment.setArguments(bundle); fragment.show(getSupportFragmentManager(), "LiveGuardDialogFragment"); } @@ -1247,7 +1245,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL /** * 打开观看列表弹窗 */ - public void openUserMoreListWindow(int i, boolean isOnly, boolean noble,boolean showBuyView) { + public void openUserMoreListWindow(int i, boolean isOnly, boolean noble, boolean showBuyView) { if (outRankHideFirst) { //获取隐身的用户的ID @@ -1265,7 +1263,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL bundle.putBoolean("only", isOnly); bundle.putBoolean("noble", noble); bundle.putString("outRankHide", GsonUtils.toJson(outRankHide)); - bundle.putBoolean("showBuyView",!showBuyView); + bundle.putBoolean("showBuyView", !showBuyView); fragment.setArguments(bundle); fragment.show(getSupportFragmentManager(), "LiveUserMoreDialogFragment"); LiveUserMoreDialogFragment.activity = (LiveActivity) mContext; @@ -1286,7 +1284,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL bundle.putString("By", i + ""); bundle.putBoolean("only", isOnly); bundle.putBoolean("noble", noble); - bundle.putBoolean("showBuyView",!showBuyView); + bundle.putBoolean("showBuyView", !showBuyView); bundle.putString("outRankHide", GsonUtils.toJson(outRankHide)); fragment.setArguments(bundle); fragment.show(getSupportFragmentManager(), "LiveUserMoreDialogFragment"); diff --git a/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity.java b/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity.java index 3796e138b..958e286d0 100644 --- a/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity.java @@ -546,44 +546,45 @@ public class MyWebViewActivity extends AbsActivity { if (!TextUtils.isEmpty(event.getMethod())) { if (TextUtils.equals(event.getMethod(), "androidCommunityGift")) { Constants.nowPostsId = event.getPostsId(); + EncourageDialog fragment = new EncourageDialog(); fragment.show(((MyWebViewActivity) mContext).getSupportFragmentManager(), "EncourageDialog"); - } - } else if (TextUtils.equals(event.getMethod(), "modifyMydata")) { - indexInto = event.getIndexInto(); - } else if (TextUtils.equals(event.getMethod(), "androidMethodLookToLive")) { - //看直播 - gotoLive(event.getLiveId()); - } else if (TextUtils.equals(event.getMethod(), "AndroidFellow")) { - mFirebaseAnalytics.logEvent("FS_Follow", null); - logger.logEvent("FB_Follow", null); - AdjustEvent adjustEvent1 = new AdjustEvent("oess6a"); - Adjust.trackEvent(adjustEvent1); + } else if (TextUtils.equals(event.getMethod(), "modifyMydata")) { + indexInto = event.getIndexInto(); + } else if (TextUtils.equals(event.getMethod(), "androidMethodLookToLive")) { + //看直播 + gotoLive(event.getLiveId()); + } else if (TextUtils.equals(event.getMethod(), "AndroidFellow")) { + mFirebaseAnalytics.logEvent("FS_Follow", null); + logger.logEvent("FB_Follow", null); + AdjustEvent adjustEvent1 = new AdjustEvent("oess6a"); + Adjust.trackEvent(adjustEvent1); - } else if (TextUtils.equals(event.getMethod(), "androidClickSayHiBack")) { - Constants.firstInto = 0; - EventBus.getDefault().post(new MainHomeCommunityToChatEvent().setTargetId(event.getUserId())); - } else if (TextUtils.equals(event.getMethod(), "androidPlayVideo")) { - VideoStorge.getInstance().put(Constants.VIDEO_COMMUNITY, event.getVideoBeanList()); - VideoPlayActivity.forward(mContext, event.getPosition(), Constants.VIDEO_COMMUNITY, 1); - } else if (TextUtils.equals(event.getMethod(), "openUpdataName")) { - isUpdataUser = event.isUpdataUser(); - } else if (TextUtils.equals(event.getMethod(), "openUpdataAutograph")) { - isUpdataUser = true; - forwardSign(); - } else if (TextUtils.equals(event.getMethod(), "openUpdataAvater")) { - isUpdataUser = true; - DialogUitl.showStringArrayDialog(mContext, new Integer[]{ - com.yunbao.main.R.string.camera, com.yunbao.main.R.string.alumb}, new DialogUitl.StringArrayDialogCallback() { - @Override - public void onItemClick(String text, int tag) { - if (tag == com.yunbao.main.R.string.camera) { - mImageUtil.getImageByCamera(); - } else { - mImageUtil.getImageByAlumb(); + } else if (TextUtils.equals(event.getMethod(), "androidClickSayHiBack")) { + Constants.firstInto = 0; + EventBus.getDefault().post(new MainHomeCommunityToChatEvent().setTargetId(event.getUserId())); + } else if (TextUtils.equals(event.getMethod(), "androidPlayVideo")) { + VideoStorge.getInstance().put(Constants.VIDEO_COMMUNITY, event.getVideoBeanList()); + VideoPlayActivity.forward(mContext, event.getPosition(), Constants.VIDEO_COMMUNITY, 1); + } else if (TextUtils.equals(event.getMethod(), "openUpdataName")) { + isUpdataUser = event.isUpdataUser(); + } else if (TextUtils.equals(event.getMethod(), "openUpdataAutograph")) { + isUpdataUser = true; + forwardSign(); + } else if (TextUtils.equals(event.getMethod(), "openUpdataAvater")) { + isUpdataUser = true; + DialogUitl.showStringArrayDialog(mContext, new Integer[]{ + com.yunbao.main.R.string.camera, com.yunbao.main.R.string.alumb}, new DialogUitl.StringArrayDialogCallback() { + @Override + public void onItemClick(String text, int tag) { + if (tag == com.yunbao.main.R.string.camera) { + mImageUtil.getImageByCamera(); + } else { + mImageUtil.getImageByAlumb(); + } } - } - }); + }); + } } } }