diff --git a/app/src/main/java/com/shayu/phonelive/AppContext.java b/app/src/main/java/com/shayu/phonelive/AppContext.java index 3faf890ec..9547beea3 100644 --- a/app/src/main/java/com/shayu/phonelive/AppContext.java +++ b/app/src/main/java/com/shayu/phonelive/AppContext.java @@ -156,7 +156,29 @@ public class AppContext extends CommonAppContext { //初始化融云 RongcloudIMManager.initRongIM(this); + RongcloudIMManager.addRongcloudIMOnReceiveMessageListener(new RongIMClient.OnReceiveMessageWrapperListener() { + @Override + public boolean onReceived(io.rong.imlib.model.Message message, int i, boolean b, boolean b1) { + Log.e("wewe", message.getConversationType() + "112121"); + //融云直播间聊天 + Message msg = Message.obtain(); + msg.what = Constants.SOCKET_WHAT_BROADCAST; + try { + if (!"".equals(message.getContent()) && message.getContent() != null) { + TextMessage content = (TextMessage) message.getContent(); + if (content.getContent().contains("_method_")) { + msg.obj = content.getContent(); + if (SocketRyClient.mSocketHandler != null) { + SocketRyClient.mSocketHandler.sendMessage(msg); + } + } + } + }catch (Exception e){ + } + return false; + } + }); //监听im消息 V2TIMManager.getInstance().addSimpleMsgListener(new V2TIMSimpleMsgListener() { diff --git a/common/src/main/java/com/yunbao/common/Constants.java b/common/src/main/java/com/yunbao/common/Constants.java index a4f2dfaaf..2d5ef0243 100644 --- a/common/src/main/java/com/yunbao/common/Constants.java +++ b/common/src/main/java/com/yunbao/common/Constants.java @@ -261,7 +261,7 @@ public class Constants { public static int isShowPage = -1; public static boolean LoginKefu = true;//是否是从客服进入 public static String nowAnchorName = "";//当前主播昵称 - public static String isSend = "0";//是否能发言,enterroom接口返回,1 可发言 0 不可发言 + public static String isSend = "1";//是否能发言,enterroom接口返回,1 可发言 0 不可发言 public static String nowId = "";//当前点击了某个单聊的id public static String remarks = "";//当前点击了某个单聊的备注 public static String isAdmin = "0";//当前点击了某个单聊是否是指导员 diff --git a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java index 73df456de..2465f3348 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java @@ -647,7 +647,7 @@ public class LiveAudienceActivity extends LiveActivity { mLiveRoomViewHolder.showPrizePoolLevel(String.valueOf(giftPrizePoolLevel)); } } - Constants.isSend = obj.getString("front_task"); +// Constants.isSend = obj.getString("front_task"); } } }); diff --git a/live/src/main/java/com/yunbao/live/dialog/NewUserDialog.java b/live/src/main/java/com/yunbao/live/dialog/NewUserDialog.java new file mode 100644 index 000000000..248eb3e53 --- /dev/null +++ b/live/src/main/java/com/yunbao/live/dialog/NewUserDialog.java @@ -0,0 +1,151 @@ +package com.yunbao.live.dialog; + +import android.os.Bundle; +import android.view.Gravity; +import android.view.View; +import android.view.Window; +import android.view.WindowManager; +import android.widget.ImageView; +import android.widget.RelativeLayout; +import android.widget.TextView; + +import androidx.annotation.Nullable; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentTransaction; + +import com.yunbao.common.dialog.AbsDialogFragment; +import com.yunbao.common.http.HttpCallback; +import com.yunbao.common.utils.ToastUtil; +import com.yunbao.live.R; +import com.yunbao.live.activity.LiveActivity; +import com.yunbao.live.http.LiveHttpUtil; + +import java.lang.reflect.Field; + +import static com.yunbao.live.activity.LiveAudienceActivity.countDownTimer; +import static com.yunbao.live.views.LiveRoomViewHolder.follow; +import static com.yunbao.live.views.LiveRoomViewHolder.mLiveUid; + +public class NewUserDialog extends AbsDialogFragment { + int gif = 0; + int gif_id = 1093; + + @Override + protected int getLayoutId() { + return R.layout.dialog_live_new_user; + } + + /** + * 主要时这个方法。上面两个方法只是获取布局用的,可以不要 + * + * @param manager + * @param tag + */ + @Override + public void show(FragmentManager manager, String tag) { + try { + Field dismissed = DialogFragment.class.getDeclaredField("mDismissed"); + dismissed.setAccessible(true); + dismissed.set(this, false); + } catch (NoSuchFieldException | IllegalAccessException e) { + e.printStackTrace(); + } + + try { + Field showByMe = DialogFragment.class.getDeclaredField("mShownByMe"); + showByMe.setAccessible(true); + showByMe.set(this, true); + } catch (NoSuchFieldException | IllegalAccessException e) { + e.printStackTrace(); + } + + FragmentTransaction ft = manager.beginTransaction(); + ft.add(this, tag); + ft.commitAllowingStateLoss(); + } + + @Override + protected int getDialogStyle() { + return R.style.dialog2; + } + + @Override + protected boolean canCancel() { + return true; + } + + @Override + protected void setWindowAttributes(Window window) { + window.setWindowAnimations(R.style.bottomToTopAnim); + WindowManager.LayoutParams params = window.getAttributes(); + params.width = WindowManager.LayoutParams.MATCH_PARENT; + params.height = WindowManager.LayoutParams.WRAP_CONTENT; + params.gravity = Gravity.CENTER; + window.setAttributes(params); + } + + @Override + public void onActivityCreated(@Nullable Bundle savedInstanceState) { + super.onActivityCreated(savedInstanceState); + ImageView btn_close = (ImageView) mRootView.findViewById(R.id.btn_close); + btn_close.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + dismiss(); + } + }); + RelativeLayout btn_rose = (RelativeLayout) mRootView.findViewById(R.id.btn_rose); + RelativeLayout btn_roses = (RelativeLayout) mRootView.findViewById(R.id.btn_roses); + RelativeLayout btn_lollipop = (RelativeLayout) mRootView.findViewById(R.id.btn_lollipop); + TextView btn_confirm = (TextView) mRootView.findViewById(R.id.btn_confirm); + btn_rose.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + gif = 1; + gif_id = 210; + btn_rose.setBackgroundResource(R.drawable.button_ffb6c4); + btn_roses.setBackgroundResource(R.drawable.button_fff8f6f8); + btn_lollipop.setBackgroundResource(R.drawable.button_fff8f6f8); + } + }); + + btn_roses.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + gif = 2; + gif_id = 224; + btn_rose.setBackgroundResource(R.drawable.button_fff8f6f8); + btn_roses.setBackgroundResource(R.drawable.button_ffb6c4); + btn_lollipop.setBackgroundResource(R.drawable.button_fff8f6f8); + } + }); + + btn_lollipop.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + gif = 0; + gif_id = 1093; + btn_rose.setBackgroundResource(R.drawable.button_fff8f6f8); + btn_roses.setBackgroundResource(R.drawable.button_fff8f6f8); + btn_lollipop.setBackgroundResource(R.drawable.button_ffb6c4); + } + }); + + + btn_confirm.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + follow(); + LiveHttpUtil.sendGift("0", mLiveUid, LiveActivity.mStream, gif_id, "1", new HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + ToastUtil.show(msg); + } + }); + countDownTimer.cancel(); + dismiss(); + } + }); + } +} diff --git a/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java index 58aaeec93..fac520ea2 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java @@ -14,6 +14,10 @@ import android.widget.LinearLayout; import android.widget.TextView; import com.alibaba.fastjson.JSONObject; +import com.opensource.svgaplayer.SVGADrawable; +import com.opensource.svgaplayer.SVGAImageView; +import com.opensource.svgaplayer.SVGAParser; +import com.opensource.svgaplayer.SVGAVideoEntity; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.Constants; import com.yunbao.common.event.MessageIMEvent; @@ -35,6 +39,9 @@ import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; +import java.net.MalformedURLException; +import java.net.URL; + /** * Created by cxf on 2018/10/9. * 观众直播间逻辑 @@ -49,6 +56,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { private TextView tv_trickery_time; private View v_msg_redpoint; private Activity context; + private SVGAImageView svga_new_user_gif; public LiveAudienceViewHolder(Context context, ViewGroup parentView) { super(context, parentView); @@ -68,6 +76,22 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { findViewById(R.id.btn_red_pack).setOnClickListener(this); findViewById(R.id.btn_gift).setOnClickListener(this); findViewById(R.id.btn_zg).setOnClickListener(this); + svga_new_user_gif = (SVGAImageView)findViewById(R.id.svga_new_user_gif); + new SVGAParser(context).decodeFromAssets("free_gift_tip.svga", new SVGAParser.ParseCompletion() { + @Override + public void onComplete(SVGAVideoEntity videoItem) { + ToastUtil.show("1212"); + SVGADrawable drawable = new SVGADrawable(videoItem); + svga_new_user_gif.setImageDrawable(drawable); + svga_new_user_gif.startAnimation(); + } + + @Override + public void onError() { + Log.e("errqs","errl"); + } + }); + findViewById(R.id.btn_mic).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index 81e899443..7d755e4fa 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -218,7 +218,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis public WindowManager windowManager; public boolean isRy = false; - public LiveRoomViewHolder(boolean isRys, int forActivity, Context context, ViewGroup parentView, GifImageView gifImageView, SVGAImageView svgaImageView, ViewGroup liveGiftPrizePoolContainer, WindowManager windowManager) { super(context, parentView); Contexts = context; diff --git a/live/src/main/res/layout/dialog_live_new_user.xml b/live/src/main/res/layout/dialog_live_new_user.xml new file mode 100644 index 000000000..ad93e1823 --- /dev/null +++ b/live/src/main/res/layout/dialog_live_new_user.xml @@ -0,0 +1,251 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/live/src/main/res/layout/view_live_audience.xml b/live/src/main/res/layout/view_live_audience.xml index 66b0a2156..8df29d3a6 100644 --- a/live/src/main/res/layout/view_live_audience.xml +++ b/live/src/main/res/layout/view_live_audience.xml @@ -2,10 +2,20 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/live/src/main/res/layout/view_live_room.xml b/live/src/main/res/layout/view_live_room.xml index bc7a536c4..0e7993bb7 100644 --- a/live/src/main/res/layout/view_live_room.xml +++ b/live/src/main/res/layout/view_live_room.xml @@ -1709,10 +1709,10 @@ android:layout_width="18dp" android:layout_height="18dp" android:layout_centerHorizontal="true" - android:layout_alignParentBottom="true" android:src="@mipmap/voice"/> + \ No newline at end of file diff --git a/live/src/main/res/mipmap-xhdpi/live_new_tip.png b/live/src/main/res/mipmap-xhdpi/live_new_tip.png new file mode 100644 index 000000000..0cf54ddd7 Binary files /dev/null and b/live/src/main/res/mipmap-xhdpi/live_new_tip.png differ diff --git a/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java b/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java index 484bebfb4..144b9b490 100644 --- a/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java @@ -67,7 +67,7 @@ public class EditProfileActivity extends AbsActivity { private String mProvinceVal; private String mCityVal; private String mZoneVal; - private boolean isInto = false; + private boolean isInto = true; private String isBind = "0", mobile = ""; private boolean isName = false; @@ -476,7 +476,7 @@ public class EditProfileActivity extends AbsActivity { } } }); - getTaskType(); +// getTaskType(); if (isName) { isName = false; MainHttpUtil.getBaseInfo(CommonAppConfig.getInstance().getUid(), CommonAppConfig.getInstance().getToken(), new CommonCallback() { diff --git a/main/src/main/java/com/yunbao/main/activity/EntryActivity.java b/main/src/main/java/com/yunbao/main/activity/EntryActivity.java index a064bdd56..d90d3e7bc 100644 --- a/main/src/main/java/com/yunbao/main/activity/EntryActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/EntryActivity.java @@ -13,6 +13,7 @@ import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.os.Environment; +import android.os.Message; import android.provider.Settings; import android.util.Base64; import android.util.Log; @@ -74,7 +75,13 @@ import com.yunbao.common.http.HttpCallback; import com.yunbao.common.interfaces.CommonCallback; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.imrongcloud.RongcloudIMManager; +import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.ToastUtil; +import com.yunbao.live.activity.LiveAudienceActivity; +import com.yunbao.live.bean.LiveBean; +import com.yunbao.live.http.LiveHttpUtil; +import com.yunbao.live.presenter.LiveRoomCheckLivePresenter; +import com.yunbao.live.socket.SocketRyClient; import com.yunbao.main.R; import com.yunbao.main.dialog.LoginTipsDialog; import com.yunbao.main.http.MainHttpUtil; @@ -83,6 +90,9 @@ import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Arrays; +import io.rong.imlib.RongIMClient; +import io.rong.message.TextMessage; + import static com.yunbao.common.CommonAppContext.logger; import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics; @@ -654,75 +664,108 @@ public class EntryActivity extends AppCompatActivity { MainHttpUtil.getBaseInfo(new CommonCallback() { @Override public void callback(UserBean bean) { - if (mFirstLogin) { - //绑定广告渠道用户 - AdjustEvent adjustEvent = new AdjustEvent("s1or0t"); - adjustEvent.addCallbackParameter("userid", "bar"); - Adjust.trackEvent(adjustEvent); - //完成第三方登录 - if(mLoginType.equals("twitter")){ - AdjustEvent adjustEvent1 = new AdjustEvent("ea6lld"); - Adjust.trackEvent(adjustEvent1); - CommonHttpUtil.setAdvertisingChannels("ea6lld", new HttpCallback() { + gotoLive("97714"); +// +// if (mFirstLogin) { +// //绑定广告渠道用户 +// AdjustEvent adjustEvent = new AdjustEvent("s1or0t"); +// adjustEvent.addCallbackParameter("userid", "bar"); +// Adjust.trackEvent(adjustEvent); +// +// //完成第三方登录 +// if(mLoginType.equals("twitter")){ +// AdjustEvent adjustEvent1 = new AdjustEvent("ea6lld"); +// Adjust.trackEvent(adjustEvent1); +// CommonHttpUtil.setAdvertisingChannels("ea6lld", new HttpCallback() { +// @Override +// public void onSuccess(int code, String msg, String[] info) { +// if(code == 0) { +// mFirebaseAnalytics.logEvent("FS_reg_twitter", null); +// logger.logEvent("FB_reg_twitter"); +// } +// } +// }); +// +// }else if(mLoginType.equals("facebook")){ +// AdjustEvent adjustEvent1 = new AdjustEvent("5jbk95"); +// Adjust.trackEvent(adjustEvent1); +// CommonHttpUtil.setAdvertisingChannels("5jbk95", new HttpCallback() { +// @Override +// public void onSuccess(int code, String msg, String[] info) { +// if(code == 0) { +// mFirebaseAnalytics.logEvent("FS_reg_fb", null); +// logger.logEvent("FB_reg_fb"); +// } +// } +// }); +// +// }else if(mLoginType.equals("google")){ +// AdjustEvent adjustEvent1 = new AdjustEvent("krap47"); +// Adjust.trackEvent(adjustEvent1); +// CommonHttpUtil.setAdvertisingChannels("krap47", new HttpCallback() { +// @Override +// public void onSuccess(int code, String msg, String[] info) { +// if(code == 0) { +// mFirebaseAnalytics.logEvent("FS_reg_google", null); +// logger.logEvent("FB_reg_google"); +// } +// } +// }); +// +// }else if(mLoginType.equals("line")){ +// AdjustEvent adjustEvent1 = new AdjustEvent("uaacbn"); +// Adjust.trackEvent(adjustEvent1); +// +// CommonHttpUtil.setAdvertisingChannels("uaacbn", new HttpCallback() { +// @Override +// public void onSuccess(int code, String msg, String[] info) { +// if(code == 0) { +// mFirebaseAnalytics.logEvent("FS_reg_line", null); +// logger.logEvent("FB_reg_line"); +// } +// } +// }); +// } +// if (CommonAppConfig.IS_GOOGLE_PLAY == true) { +// EntryActivity.this.startActivity(new Intent(EntryActivity.this, OneLoginActivity.class)); +// }else{ +// gotoLive("97714"); +// MainActivity.forward(EntryActivity.this, false); +// } +// } else { +// MainActivity.forward(EntryActivity.this, false); +// } +// EntryActivity.activity.finish(); + } + }); + } + + private LiveRoomCheckLivePresenter mCheckLivePresenter; + + private void gotoLive(final String live_id) { + LiveHttpUtil.getLiveInfo(live_id, new HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + if (code == 0 && info.length > 0) { + LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class); + + if (mCheckLivePresenter == null) { + mCheckLivePresenter = new LiveRoomCheckLivePresenter(EntryActivity.this, new LiveRoomCheckLivePresenter.ActionListener() { @Override - public void onSuccess(int code, String msg, String[] info) { - if(code == 0) { - mFirebaseAnalytics.logEvent("FS_reg_twitter", null); - logger.logEvent("FB_reg_twitter"); + public void onLiveRoomChanged(LiveBean liveBean, int liveType, int liveTypeVal, int liveSdk) { + if (liveBean == null) { + return; } - } - }); + LiveAudienceActivity.forward(EntryActivity.this, liveBean, liveType, liveTypeVal, "", 0, liveSdk); - }else if(mLoginType.equals("facebook")){ - AdjustEvent adjustEvent1 = new AdjustEvent("5jbk95"); - Adjust.trackEvent(adjustEvent1); - CommonHttpUtil.setAdvertisingChannels("5jbk95", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if(code == 0) { - mFirebaseAnalytics.logEvent("FS_reg_fb", null); - logger.logEvent("FB_reg_fb"); - } - } - }); - - }else if(mLoginType.equals("google")){ - AdjustEvent adjustEvent1 = new AdjustEvent("krap47"); - Adjust.trackEvent(adjustEvent1); - CommonHttpUtil.setAdvertisingChannels("krap47", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if(code == 0) { - mFirebaseAnalytics.logEvent("FS_reg_google", null); - logger.logEvent("FB_reg_google"); - } - } - }); - - }else if(mLoginType.equals("line")){ - AdjustEvent adjustEvent1 = new AdjustEvent("uaacbn"); - Adjust.trackEvent(adjustEvent1); - - CommonHttpUtil.setAdvertisingChannels("uaacbn", new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if(code == 0) { - mFirebaseAnalytics.logEvent("FS_reg_line", null); - logger.logEvent("FB_reg_line"); - } } }); } - if (CommonAppConfig.IS_GOOGLE_PLAY == true) { - EntryActivity.this.startActivity(new Intent(EntryActivity.this, OneLoginActivity.class)); - }else{ - MainActivity.forward(EntryActivity.this, false); - } + mCheckLivePresenter.checkLive(liveBean); } else { MainActivity.forward(EntryActivity.this, false); } - EntryActivity.activity.finish(); } }); } diff --git a/main/src/main/java/com/yunbao/main/activity/MainActivity.java b/main/src/main/java/com/yunbao/main/activity/MainActivity.java index 6e30396a8..4c249d41a 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -38,10 +38,12 @@ import com.tencent.imsdk.v2.V2TIMManager; import com.tencent.imsdk.v2.V2TIMSDKConfig; import com.tencent.imsdk.v2.V2TIMSDKListener; import com.tencent.imsdk.v2.V2TIMUserFullInfo; + import com.yunbao.common.CommonAppConfig; import com.yunbao.common.Constants; import com.yunbao.common.activity.AbsActivity; import com.yunbao.common.adapter.ViewPagerAdapter; +import com.yunbao.common.bean.BaseModel; import com.yunbao.common.bean.ChatRemarksBean; import com.yunbao.common.bean.ConfigBean; import com.yunbao.common.bean.LiveSvgGiftBean; @@ -55,7 +57,6 @@ import com.yunbao.common.http.CommonHttpConsts; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.interfaces.CommonCallback; import com.yunbao.common.manager.IMLoginManager; -import com.yunbao.common.manager.imrongcloud.MessageIMManager; import com.yunbao.common.manager.imrongcloud.RongcloudIMManager; import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.DpUtil; @@ -72,6 +73,7 @@ import com.yunbao.common.views.AbsMainViewHolder; import com.yunbao.live.LiveConfig; import com.yunbao.live.activity.LiveAnchorActivity; import com.yunbao.live.activity.LiveRyAnchorActivity; +import com.yunbao.live.activity.PDLIiveChatActivity; import com.yunbao.live.bean.LiveBean; import com.yunbao.live.bean.LiveKsyConfigBean; import com.yunbao.live.http.LiveHttpConsts; @@ -358,26 +360,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene mViewPager.setCurrentItem(0); mTabButtonGroup.setCurPosition(0); isInstructor(); - RongcloudIMManager.addRongcloudIMOnReceiveMessageListener(new RongIMClient.OnReceiveMessageWrapperListener() { - @Override - public boolean onReceived(io.rong.imlib.model.Message message, int i, boolean b, boolean b1) { - Log.e("wewe", message.getConversationType() + "112121"); - MessageIMManager.get(mContext).getSystemForRongcloud(message); - //融云直播间聊天 - Message msg = Message.obtain(); - msg.what = Constants.SOCKET_WHAT_BROADCAST; - if (message.getContent() instanceof TextMessage && !"".equals(message.getContent()) && message.getContent() != null) { - TextMessage content = (TextMessage) message.getContent(); - if (content.getContent().contains("_method_")) { - msg.obj = content.getContent(); - if (SocketRyClient.mSocketHandler != null) { - SocketRyClient.mSocketHandler.sendMessage(msg); - } - } - } - return false; - } - }); + } @@ -1071,13 +1054,8 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene public void onMessageIMEvent(MessageIMEvent event) { messageNumber = event.getNumber(); if (event.getNumber() > 0) { - if (event.getNumber() > 99) { - v_table_redpoint.setText("99+"); - } else { - v_table_redpoint.setText(event.getNumber() + ""); - } v_table_redpoint.setVisibility(View.VISIBLE); - + v_table_redpoint.setText(event.getNumber() + ""); } else { v_table_redpoint.setVisibility(View.GONE); v_table_redpoint.setText(""); diff --git a/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java index 60ec87c5a..54d3abdff 100644 --- a/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java @@ -508,9 +508,9 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi } else if (i == R.id.rt_setting) { forwardSetting(); } else if (i == R.id.lt_noble) { - Constants.isTitle = false; + Constants.isTitle = true; UserBean u = CommonAppConfig.getInstance().getUserBean(); - String url = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname=" + u.getUserNiceName() + "&usernobId=" + u.getNoble_id() + "&token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid(); + String url = CommonAppConfig.HOST + "/h5/Nobility.html?nickname=" + u.getUserNiceName() + "&usernobId=" + u.getNoble_id() + "&token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid(); ZhuangBanActivity.forward(mContext, url, false); }