diff --git a/common/src/main/res/values-en/strings.xml b/common/src/main/res/values-en/strings.xml
index 26d6a41c5..bb41c81a5 100644
--- a/common/src/main/res/values-en/strings.xml
+++ b/common/src/main/res/values-en/strings.xml
@@ -873,4 +873,5 @@ Limited ride And limited avatar frame
has recommended an anchor to you!
has sent you a reward, come and get it!
Pay attention to the channel that suits you.
+ What do you say to everyone
diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml
index 4ca6950ce..56c3317ea 100644
--- a/common/src/main/res/values/strings.xml
+++ b/common/src/main/res/values/strings.xml
@@ -890,4 +890,5 @@
系統通知
在線客服
向你發送了一個獎勵,快來領取吧!
+ 和大家說些什麼
diff --git a/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java
index a00177be3..4f843825c 100644
--- a/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java
+++ b/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java
@@ -14,6 +14,7 @@ import androidx.fragment.app.DialogFragment;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
+import com.blankj.utilcode.util.GsonUtils;
import com.lzy.okgo.callback.Callback;
import com.lzy.okgo.model.Progress;
import com.lzy.okgo.model.Response;
@@ -43,6 +44,8 @@ import com.yunbao.live.R;
import com.yunbao.live.bean.LiveBean;
import com.yunbao.live.bean.LiveGuardInfo;
import com.yunbao.live.bean.LiveKsyConfigBean;
+import com.yunbao.live.bean.LiveReceiveGiftBean;
+import com.yunbao.live.bean.WishlistModel;
import com.yunbao.live.dialog.LiveBeautyDialogFragment;
import com.yunbao.live.dialog.LiveFunctionDialogFragment;
import com.yunbao.live.dialog.LiveLinkMicListDialogFragment;
@@ -611,8 +614,25 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
mLiveRoomViewHolder.setName(u.getUserNiceName());
mLiveRoomViewHolder.setAvatar(u.getAvatar());
mLiveRoomViewHolder.setAnchorLevel(u.getLevelAnchor());
+ mLiveRoomViewHolder.initHourRankList();
}
mLiveRoomViewHolder.startAnchorLight();
+ //心愿单
+ LiveHttpUtil.getWishList(mLiveUid, new HttpCallback() {
+ @Override
+ public void onSuccess(int code, String msg, String[] info) {
+ if (info.length > 0) {
+ String json = info[0];
+ WishlistModel model = GsonUtils.fromJson(json, WishlistModel.class);
+ if (mLiveRoomViewHolder != null && model != null) {
+ mLiveRoomViewHolder.initWishList(model.getWishlist());
+ }
+ }
+ }
+ @Override
+ public void onFinish() {
+ }
+ });
}
if (mLiveAnchorViewHolder == null) {
mLiveAnchorViewHolder = new LiveRyAnchorViewHolder(mContext, mContainer);
@@ -1220,6 +1240,25 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
LiveHttpUtil.anchorCheckLive(mLiveUid, mStream, mCheckLiveCallback);
}
+ @Override
+ public void onSendGift(LiveReceiveGiftBean bean) {
+ //购买守护
+ if (bean.ismTypeBuyGuard()) {
+ if (mLiveRoomViewHolder != null) {
+ mLiveRoomViewHolder.showGuardGifMessage(bean);
+ }
+ } else {
+
+ if (mLiveRoomViewHolder != null) {
+ if (bean.getmLiveUId().equals(bean.getRoomnum())) {
+ mLiveRoomViewHolder.insertChat(bean.getLiveChatBean(), 1);
+ }
+ mLiveRoomViewHolder.showGiftMessage(bean, false);
+ mLiveRoomViewHolder.updataWishList(bean.getGiftId(), bean.getGiftCount());
+ }
+
+ }
+ }
private void printLog(String content) {
if (mLogFile == null) {
diff --git a/live/src/main/java/com/yunbao/live/views/LiveNewReadyRyViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveNewReadyRyViewHolder.java
index 100b9fbbe..aa5e83595 100644
--- a/live/src/main/java/com/yunbao/live/views/LiveNewReadyRyViewHolder.java
+++ b/live/src/main/java/com/yunbao/live/views/LiveNewReadyRyViewHolder.java
@@ -477,28 +477,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
isHttpBack = false;
final CommonAppConfig appConfig = CommonAppConfig.getInstance();
UserBean u = appConfig.getUserBean();
- V2TIMManager.getInstance().createGroup(V2TIMManager.GROUP_TYPE_AVCHATROOM, "g" + appConfig.getUid(), "直播", new V2TIMSendCallback() {
- @Override
- public void onProgress(int progress) {
-
- }
-
- @Override
- public void onSuccess(String s) {
- Log.i("tx", "创建成功");
- ((LiveAnchorActivity) mContext).startLiveSuccess(info[0], mLiveType, mLiveTypeVal);
- }
-
- @Override
- public void onError(int code, String desc) {
- Log.i("tx", code + "创建失败" + desc);
- if (code == 10025) {
- ((LiveAnchorActivity) mContext).startLiveSuccess(info[0], mLiveType, mLiveTypeVal);
- } else {
- ToastUtil.show("开播失败,联系客服。");
- }
- }
- });
+ ((LiveRyAnchorActivity) mContext).startLiveSuccess(info[0], mLiveType, mLiveTypeVal);
} else {
ToastUtil.show(msg);
}
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 d6edc9c61..452bacb70 100644
--- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java
+++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java
@@ -731,7 +731,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
findViewById(R.id.hot_btn).setOnClickListener(this);
try {
Glide.with(mContext).asGif().load(R.drawable.fans_medal).into(mViewMedal);
- }catch (Exception e){
+ } catch (Exception e) {
System.err.println("发生异常行为");
e.printStackTrace();
}
@@ -936,17 +936,18 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
// fastMsgRecyclerView.setItemAnimator(new DefaultItemAnimator());
//主播页面隐藏头部
if (mContext instanceof LiveRyAnchorActivity) {
- // findViewById(R.id.hour_rank_layout).setVisibility(View.GONE);
- // findViewById(R.id.live_wks_layout).setVisibility(View.GONE);
- // findViewById(R.id.wish_list_layout).setVisibility(View.GONE);
- // findViewById(R.id.hour_rank_layout).setEnabled(false);
+ // findViewById(R.id.hour_rank_layout).setVisibility(View.GONE);
+ // findViewById(R.id.live_wks_layout).setVisibility(View.GONE);
+ // findViewById(R.id.wish_list_layout).setVisibility(View.GONE);
+ // findViewById(R.id.hour_rank_layout).setEnabled(false);
/* findViewById(R.id.live_wks_layout).setEnabled(false);
findViewById(R.id.wish_list_layout).setEnabled(false);*/
findViewById(R.id.open_sidebar).setVisibility(View.GONE);
findViewById(R.id.btn_follow).setVisibility(View.GONE);
+ }else {
+ configBanner3();
}
reloadIM();
- configBanner3();
}
private void showBanner2() {
@@ -1178,6 +1179,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
ImageView hourPic = hourView.findViewById(R.id.wish_pic);
mHotText = hotView.findViewById(R.id.wish_index);
mHourRank = hourView.findViewById(R.id.wish_index);
+ mHotText.setText("0");
mHotText.setLayoutParams(textParams);
mHourRank.setLayoutParams(textParams);
mHotText.setGravity(Gravity.CENTER);
@@ -1189,7 +1191,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
hourPic.setLayoutParams(params);
flipper.addView(hotView);
flipper.addView(hourView);
-
+ flipper.startFlipping();
+ if (mContext instanceof LiveRyAnchorActivity) {
+ return;
+ }
flipper.setOnClickListener(view -> {
Bundle bundle = new Bundle();
String path = info.get(0).getUrl();
@@ -1207,7 +1212,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
liveHDDialogFragment.setArguments(bundle);
liveHDDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
});
- flipper.startFlipping();
+
}
}, Throwable::printStackTrace)
.isDisposed();
@@ -1326,8 +1331,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
});
//点击打开周星榜
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.live_wks_layout),
- () -> Bus.get().post(new LiveAudienceEvent()
- .setType(LiveAudienceEvent.LiveAudienceType.LIVE_WKS)));
+ () -> {
+
+ Bus.get().post(new LiveAudienceEvent()
+ .setType(LiveAudienceEvent.LiveAudienceType.LIVE_WKS));
+ });
}
public static int pkEndIndex = 0;
@@ -1711,7 +1719,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
} else if (i == R.id.user_guard) {
// ((LiveActivity) mContext).openUserMoreListWindow(2, true);
((LiveActivity) mContext).openNewGuardListWindow();
- } if (i == R.id.lt_trickery) {
+ }
+ if (i == R.id.lt_trickery) {
showTrickeryDialog();
}
@@ -1803,7 +1812,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
public void onSuccess(List conversations) {
if (conversations != null && !conversations.isEmpty()) {
for (Conversation conversation : conversations) {
- if(conversation.getUnreadMessageCount()!=0){
+ if (conversation.getUnreadMessageCount() != 0) {
UserInfo userInfo = RongUserInfoManager.getInstance().getUserInfo(conversation.getTargetId());
if (userInfo != null) {
ImgLoader.display(mContext, userInfo.getPortraitUri().toString(), msgUserIcon);
@@ -1812,7 +1821,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
}
}
}
- changeMsgView(msg2,msg);
+ changeMsgView(msg2, msg);
}
@Override
diff --git a/live/src/main/res/layout/view_live_room.xml b/live/src/main/res/layout/view_live_room.xml
index 04fc67432..3f29ec37a 100644
--- a/live/src/main/res/layout/view_live_room.xml
+++ b/live/src/main/res/layout/view_live_room.xml
@@ -655,7 +655,7 @@
android:id="@+id/goto_room_view"
android:layout_width="wrap_content"
android:layout_height="27dp"
- android:layout_below="@id/live_time"
+ android:layout_below="@id/lin"
android:layout_alignParentRight="true"
android:layout_marginTop="16dp"
android:layout_marginRight="9dp"
diff --git a/live/src/main/res/layout/view_ry_live_anchor.xml b/live/src/main/res/layout/view_ry_live_anchor.xml
index acbb880bf..20997d1d8 100644
--- a/live/src/main/res/layout/view_ry_live_anchor.xml
+++ b/live/src/main/res/layout/view_ry_live_anchor.xml
@@ -139,17 +139,16 @@ PK"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginRight="5dp"
- android:layout_toLeftOf="@id/btn_close"
+ android:layout_toLeftOf="@id/btn_function"
android:padding="5dp"
- android:src="@mipmap/icon_live_msg"
- />
+ android:src="@mipmap/icon_live_msg" />
+ android:textSize="14sp" />
+
+ android:visibility="gone" />
+ android:visibility="invisible" />
+ android:visibility="invisible" />
\ No newline at end of file