增加相亲模式相关接口
This commit is contained in:
@@ -138,10 +138,10 @@ import com.yizhuan.xchat_android_core.mentoring_relationship.event.MentoringStop
|
||||
import com.yizhuan.xchat_android_core.mentoring_relationship.model.MentoringRelationshipModel;
|
||||
import com.yizhuan.xchat_android_core.miniworld.bean.MiniWorldInWorldInfo;
|
||||
import com.yizhuan.xchat_android_core.music.model.PlayerModel;
|
||||
import com.yizhuan.xchat_android_core.redPacket.bean.ActionDialogInfo;
|
||||
import com.yizhuan.xchat_android_core.redpackage.RedPackageModel;
|
||||
import com.yizhuan.xchat_android_core.room.activitytimer.ActivityTimerEvent;
|
||||
import com.yizhuan.xchat_android_core.room.bean.RoomInfo;
|
||||
import com.yizhuan.xchat_android_core.room.event.DatingSelectUserEvent;
|
||||
import com.yizhuan.xchat_android_core.room.event.RoomClearScreenEvent;
|
||||
import com.yizhuan.xchat_android_core.room.face.DynamicFaceModel;
|
||||
import com.yizhuan.xchat_android_core.room.face.FaceInfo;
|
||||
@@ -242,8 +242,6 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
private AvRoomNobleWelcomeView mNobleWelcomeView;
|
||||
private ViewStub mVsNobleWelcome;
|
||||
|
||||
private List<ActionDialogInfo> mActionDialogInfoList;
|
||||
|
||||
private Disposable mDisposable;
|
||||
private int audioQulity;
|
||||
|
||||
@@ -254,7 +252,6 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
private Disposable ktvDisposable;
|
||||
private boolean isCloseScreen;
|
||||
private boolean isOpenRedPackage;
|
||||
private boolean isRoomPureMode;
|
||||
|
||||
private boolean isDatingMode;
|
||||
/**
|
||||
@@ -407,7 +404,6 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
gameBinding.setRoomInfo(AvRoomDataManager.get().mCurrentRoomInfo);
|
||||
isCloseScreen = AvRoomDataManager.get().isCloseScreen();
|
||||
isOpenRedPackage = AvRoomDataManager.get().isOpenRedPackage();
|
||||
isRoomPureMode = AvRoomDataManager.get().isOpenPureMode();
|
||||
showGiftValue = AvRoomDataManager.get().isShowGiftValue();
|
||||
openOrCloseGiftValue(true);
|
||||
hideKtvRelaView();
|
||||
@@ -551,6 +547,8 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
break;
|
||||
case RoomEvent.ROOM_INFO_UPDATE:
|
||||
Logger.i("房间更新事件");
|
||||
|
||||
addOpenDatingTips(); //一定要放在updateView之前!!!
|
||||
gameBinding.setRoomInfo(AvRoomDataManager.get().mCurrentRoomInfo);
|
||||
updateScreen();
|
||||
updateRedPackage();
|
||||
@@ -890,7 +888,6 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
if (AvRoomDataManager.get().mCurrentRoomInfo == null || isOpenRedPackage == AvRoomDataManager.get().mCurrentRoomInfo.isServerRedEnvelopeSwitch())
|
||||
return;
|
||||
isOpenRedPackage = AvRoomDataManager.get().mCurrentRoomInfo.isServerRedEnvelopeSwitch();
|
||||
// getMvpPresenter().updateRedPackage(isOpenRedPackage);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -946,14 +943,6 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
getMvpPresenter().userRoomIn();
|
||||
}
|
||||
|
||||
// // 自动发公屏聊天消息
|
||||
// Observable.interval(150, TimeUnit.MILLISECONDS)
|
||||
// .subscribeOn(Schedulers.computation())
|
||||
// .observeOn(AndroidSchedulers.mainThread())
|
||||
// .compose(bindToLifecycle())
|
||||
// .subscribe(aLong -> {
|
||||
// getMvpPresenter().sendTextMsg(aLong + "app-test");
|
||||
// });
|
||||
updateMentoringCountDownTimer();
|
||||
}
|
||||
|
||||
@@ -1106,7 +1095,7 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
microView.bindAdapter(new KtvMicroViewAdapter(mContext));
|
||||
}
|
||||
|
||||
}else if (AvRoomDataManager.get().isDatingMode()) {
|
||||
} else if (AvRoomDataManager.get().isDatingMode()) {
|
||||
if (!microType.equals(BaseMicroViewAdapter.MICRO_TYPE_DATING)) {
|
||||
microView.bindAdapter(new DatingMicroViewAdapter(mContext));
|
||||
}
|
||||
@@ -1273,13 +1262,6 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
bottomView.setMicBtnOpen(false);
|
||||
} else {
|
||||
bottomView.setMicBtnEnable(true);
|
||||
// if (RtcEngineManager.get().isMute) {
|
||||
// bottomView.setMicBtnEnable(true);
|
||||
// bottomView.setMicBtnOpen(false);
|
||||
// } else {
|
||||
// bottomView.setMicBtnEnable(true);
|
||||
// bottomView.setMicBtnOpen(true);
|
||||
// }
|
||||
if (RtcEngineManager.get().isMute) {
|
||||
bottomView.setMicBtnOpen(false);
|
||||
} else {
|
||||
@@ -1297,6 +1279,7 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
bottomView.setMicBtnEnable(false);
|
||||
bottomView.setMicBtnOpen(false);
|
||||
}
|
||||
refreshDatingNextStatus();
|
||||
}
|
||||
|
||||
private void updateQueuingMicBtn() {
|
||||
@@ -1317,6 +1300,38 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
}
|
||||
}
|
||||
|
||||
private void refreshDatingNextStatus() {
|
||||
RoomInfo currentRoomInfo = AvRoomDataManager.get().mCurrentRoomInfo;
|
||||
if (currentRoomInfo == null) return;
|
||||
if (AvRoomDataManager.get().isPreside(UserUtils.getUserUid())) {
|
||||
gameBinding.tvDatingNext.setVisibility(View.VISIBLE);
|
||||
String hintText = "";
|
||||
if (!TextUtils.isEmpty(currentRoomInfo.getBlindDateState())) {
|
||||
switch (currentRoomInfo.getBlindDateState()) {
|
||||
case RoomInfo.DATING_STATE_FLOW:
|
||||
gameBinding.tvDatingNext.setText("心动选人");
|
||||
hintText = "进入心动选人环节?";
|
||||
break;
|
||||
case RoomInfo.DATING_STATE_SELECT:
|
||||
gameBinding.tvDatingNext.setText("公布心动");
|
||||
hintText = "进入公布心动环节?";
|
||||
break;
|
||||
case RoomInfo.DATING_STATE_PUBLISH:
|
||||
gameBinding.tvDatingNext.setText("结束本轮");
|
||||
hintText = "结束本轮,同时清空魅力值?";
|
||||
break;
|
||||
}
|
||||
}
|
||||
//只有主持自己能改变这个状态,所以理论上来说只有再次调用refreshDatingNextStatus()文案才可能会改变了,就不再写次switch了
|
||||
String finalHintText = hintText;
|
||||
gameBinding.tvDatingNext.setOnClickListener(v ->
|
||||
getDialogManager().showOkCancelDialog(finalHintText, true, () -> getMvpPresenter().datingNext()));
|
||||
} else {
|
||||
gameBinding.tvDatingNext.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void updateRemoteMuteBtn() {
|
||||
if (AvRoomDataManager.get().mCurrentRoomInfo != null) {
|
||||
bottomView.setRemoteMuteOpen(!RtcEngineManager.get().isRemoteMute);
|
||||
@@ -1327,12 +1342,6 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
updateMicBtn();
|
||||
}
|
||||
|
||||
public void updatePkBoard() {
|
||||
if (AvRoomDataManager.get().isOpenPKMode()) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
@@ -1356,6 +1365,13 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onDatingSelectUserEvent(DatingSelectUserEvent event) {
|
||||
if (getMvpPresenter() != null) {
|
||||
getMvpPresenter().datingSelect(event.getChosenUserId());
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void displayMentoringCountDownTimer(MentoringCountingEvent event) {
|
||||
long mills = event.getMillisUntilFinished();
|
||||
@@ -1717,7 +1733,9 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
@Override
|
||||
public void showOwnerClickDialog(final RoomMicInfo roomMicInfo, final int micPosition, final long currentUid) {
|
||||
List<ButtonItem> buttonItems = new ArrayList<>(4);
|
||||
final ButtonItem buttonItem1 = new ButtonItem(getString(R.string.embrace_up_mic), new ButtonItem.OnClickListener() {
|
||||
final boolean presideMic = AvRoomDataManager.get().isDatingMode() && micPosition == -1;
|
||||
final String presideText = presideMic ? "当主持人" : "";
|
||||
final ButtonItem buttonItem1 = new ButtonItem(getString(R.string.embrace_up_mic) + presideText, new ButtonItem.OnClickListener() {
|
||||
@Override
|
||||
public void onClick() {
|
||||
RoomInviteActivity.openActivity(getActivity(), micPosition);
|
||||
@@ -3096,5 +3114,15 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
gameBinding.microView.getAdapter().notifyDataSetChanged();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 开启相亲模式管理增加一条公屏提示
|
||||
*/
|
||||
private void addOpenDatingTips() {
|
||||
if (AvRoomDataManager.get().isDatingMode() && !isDatingMode && AvRoomDataManager.get().isManager()) {
|
||||
String tips = "相亲玩法已开启,请点击主持人麦位选择主持人";
|
||||
ChatRoomMessage tipMessage = ChatRoomMessageBuilder.createTipMessage(tips);
|
||||
tipMessage.setContent(tips);
|
||||
IMNetEaseManager.get().addMessages(tipMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -22,6 +22,7 @@ import com.netease.nimlib.sdk.util.Entry;
|
||||
import com.orhanobut.logger.Logger;
|
||||
import com.yizhuan.erban.avroom.view.IHomePartyView;
|
||||
import com.yizhuan.erban.base.BaseMvpPresenter;
|
||||
import com.yizhuan.erban.utils.UserUtils;
|
||||
import com.yizhuan.xchat_android_core.Constants;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.bean.RoomQueueInfo;
|
||||
@@ -908,4 +909,23 @@ public class HomePartyPresenter extends BaseMvpPresenter<IHomePartyView> {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void datingNext() {
|
||||
final RoomInfo roomInfo = AvRoomDataManager.get().mCurrentRoomInfo;
|
||||
if (roomInfo == null) return;
|
||||
mHomePartyMode.datingNext(roomInfo.getUid())
|
||||
.compose(bindToLifecycle())
|
||||
.doOnError(e -> SingleToastUtil.showToast(e.getMessage()))
|
||||
.subscribe();
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
public void datingSelect(long chosenUserId) {
|
||||
final RoomInfo roomInfo = AvRoomDataManager.get().mCurrentRoomInfo;
|
||||
if (roomInfo == null) return;
|
||||
mHomePartyMode.datingSelect(chosenUserId, UserUtils.getUserUid(), roomInfo.getUid())
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe(s -> SingleToastUtil.showToast("选择成功")
|
||||
, e -> SingleToastUtil.showToast(e.getMessage()));
|
||||
}
|
||||
}
|
||||
|
@@ -58,6 +58,7 @@ import com.yizhuan.xchat_android_core.praise.PraiseModel;
|
||||
import com.yizhuan.xchat_android_core.room.bean.RoomInfo;
|
||||
import com.yizhuan.xchat_android_core.room.bean.RoomResult;
|
||||
import com.yizhuan.xchat_android_core.room.dragonball.DragonBallModel;
|
||||
import com.yizhuan.xchat_android_core.room.event.DatingSelectUserEvent;
|
||||
import com.yizhuan.xchat_android_core.room.face.FaceReceiveInfo;
|
||||
import com.yizhuan.xchat_android_core.room.giftvalue.GiftValueModel;
|
||||
import com.yizhuan.xchat_android_core.room.giftvalue.bean.RoomGiftValue;
|
||||
@@ -79,6 +80,8 @@ import com.yizhuan.xchat_android_library.utils.ListUtils;
|
||||
import com.yizhuan.xchat_android_library.utils.SingleToastUtil;
|
||||
import com.yizhuan.xchat_android_library.utils.config.BasicConfig;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
@@ -107,7 +110,6 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
|
||||
private boolean isAttention;
|
||||
private UserInfo userInfo;
|
||||
private ImageView closeImage;
|
||||
//private ImageView ivTopBg;
|
||||
private FrameLayout avatarLayout;
|
||||
private ImageView ivAvatarHeadWear;
|
||||
private ImageView avatar;
|
||||
@@ -125,9 +127,7 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
|
||||
private AppCompatImageView ivNewUser;
|
||||
private AppCompatImageView mIvGoodNumber;
|
||||
private AppCompatImageView mIvUserLevel;
|
||||
private AppCompatImageView ivNamePlateView;
|
||||
private AppCompatImageView mIvUserCharm;
|
||||
private LinearLayout llFamily;
|
||||
private TextView tvFamilyNameLabel;
|
||||
private TextView tvFamilyName;
|
||||
private FlexboxLayout flexbox;
|
||||
@@ -150,6 +150,8 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
|
||||
|
||||
private ViewItem findHimView;
|
||||
|
||||
private TextView tvSelectHim;
|
||||
|
||||
public UserInfoDialog(Context context, long uid, List<ViewItem> buttons, boolean isInRoom) {
|
||||
super(context, R.style.ErbanUserInfoDialog);
|
||||
this.context = context;
|
||||
@@ -186,7 +188,6 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
|
||||
ivGender = findViewById(R.id.iv_gender);
|
||||
|
||||
fansNumber = findViewById(R.id.fans_number);
|
||||
//ivTopBg = findViewById(R.id.iv_top_bg);
|
||||
flexbox = findViewById(R.id.flexbox);
|
||||
|
||||
inOfficialMask = findViewById(R.id.in_official_mask);
|
||||
@@ -201,10 +202,9 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
|
||||
mIvUserLevel = findViewById(R.id.iv_user_level);
|
||||
mIvUserCharm = findViewById(R.id.iv_user_charm);
|
||||
|
||||
llFamily = (LinearLayout) findViewById(R.id.ll_family);
|
||||
tvFamilyNameLabel = (TextView) findViewById(R.id.tv_family_name_label);
|
||||
tvFamilyName = (TextView) findViewById(R.id.tv_family_name);
|
||||
|
||||
tvSelectHim = findViewById(R.id.tv_select_him);
|
||||
avatarLayout.setOnClickListener(this);
|
||||
closeImage.setOnClickListener(this);
|
||||
TextView tvReport = findViewById(R.id.tv_report);
|
||||
@@ -223,7 +223,7 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
|
||||
addMainAndMicBottons();
|
||||
subscribe = IMNetEaseManager.get().getChatRoomEventObservable().subscribe(this::onReceiveRoomEvent);
|
||||
initAttentData();
|
||||
|
||||
initDatingData();
|
||||
UserModel.get().getUserInfo(uid)
|
||||
.subscribe(new SingleObserver<UserInfo>() {
|
||||
@Override
|
||||
@@ -263,6 +263,37 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
|
||||
}
|
||||
}
|
||||
|
||||
private void initDatingData() {
|
||||
RoomInfo roomInfo = AvRoomDataManager.get().mCurrentRoomInfo;
|
||||
if (roomInfo != null &&
|
||||
AvRoomDataManager.get().isDatingMode() &&
|
||||
RoomInfo.DATING_STATE_SELECT.equals(roomInfo.getBlindDateState()) &&
|
||||
AvRoomDataManager.get().isOwnerOnMic() &&
|
||||
!AvRoomDataManager.get().isSelectUser(myUid) &&
|
||||
AvRoomDataManager.get().isOnMic(uid) &&
|
||||
myUid != uid &&
|
||||
!AvRoomDataManager.get().isPreside(myUid) &&
|
||||
!AvRoomDataManager.get().isPreside(uid)) {
|
||||
tvSelectHim.setVisibility(View.VISIBLE);
|
||||
tvSelectHim.setOnClickListener(v -> {
|
||||
int micPosition = AvRoomDataManager.get().getMicPosition(uid);
|
||||
if (micPosition == Integer.MIN_VALUE) {
|
||||
SingleToastUtil.showToast("该用户已不在麦位上,请重新选择");
|
||||
} else {
|
||||
new DialogManager(context).showOkCancelDialog("确认选择" + (micPosition + 1) + "号嘉宾?",
|
||||
true, () -> {
|
||||
EventBus.getDefault().post(new DatingSelectUserEvent(uid, myUid, roomInfo.getUid()));
|
||||
dismiss();
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
} else {
|
||||
tvSelectHim.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param isVisiable ture则表示上麦的网格布局可见
|
||||
*/
|
||||
@@ -478,10 +509,10 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
|
||||
}
|
||||
|
||||
//铭牌
|
||||
if (!TextUtils.isEmpty(userInfo.getNameplatePic()) && !TextUtils.isEmpty(userInfo.getNameplateWord())){
|
||||
setNamePlate(userInfo.getNameplatePic(),userInfo.getNameplateWord());
|
||||
}else {
|
||||
setNamePlate(null,null);
|
||||
if (!TextUtils.isEmpty(userInfo.getNameplatePic()) && !TextUtils.isEmpty(userInfo.getNameplateWord())) {
|
||||
setNamePlate(userInfo.getNameplatePic(), userInfo.getNameplateWord());
|
||||
} else {
|
||||
setNamePlate(null, null);
|
||||
}
|
||||
// 改变贵族
|
||||
updateNobleView();
|
||||
@@ -553,7 +584,7 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
|
||||
ImageView ivNamePlate;
|
||||
ivNamePlate = inNamePlate.findViewById(R.id.iv_official_mask);
|
||||
if (ivNamePlate != null) {
|
||||
ImageLoadUtils.loadImage(context,nameplatePic, ivNamePlate);
|
||||
ImageLoadUtils.loadImage(context, nameplatePic, ivNamePlate);
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -615,7 +646,7 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
|
||||
// 设置普通人
|
||||
if (userHeadwear != null && !TextUtils.isEmpty(userHeadwear.getPic())) {
|
||||
havaHead = true;
|
||||
NobleUtil.loadHeadWear(userHeadwear.getEffect()!=null?userHeadwear.getEffect():userHeadwear.getPic(), ivAvatarHeadWear);
|
||||
NobleUtil.loadHeadWear(userHeadwear.getEffect() != null ? userHeadwear.getEffect() : userHeadwear.getPic(), ivAvatarHeadWear);
|
||||
}
|
||||
|
||||
if (nobleInfo == null || TextUtils.isEmpty(nobleInfo.getCardBg())) {
|
||||
|
@@ -321,6 +321,26 @@
|
||||
android:visibility="gone">
|
||||
|
||||
</androidx.recyclerview.widget.RecyclerView>
|
||||
|
||||
<com.coorchice.library.SuperTextView
|
||||
android:id="@+id/tv_select_him"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:gravity="center"
|
||||
android:text="选择心动"
|
||||
android:textColor="#FFFEFE"
|
||||
android:textSize="13sp"
|
||||
android:visibility="gone"
|
||||
app:corner="15dp"
|
||||
app:shaderEnable="true"
|
||||
app:shaderEndColor="#FA4771"
|
||||
app:shaderMode="leftToRight"
|
||||
app:shaderStartColor="#FA7187"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
@@ -1053,4 +1053,15 @@ public final class AvRoomDataManager {
|
||||
return mCurrentRoomInfo != null && mCurrentRoomInfo.getPlayType() == RoomInfo.PLAY_TYPE_DATING;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return 相亲模式是否已经选择心动对象了
|
||||
*/
|
||||
public boolean isSelectUser(long uid) {
|
||||
RoomQueueInfo roomQueueInfo = getRoomQueueMemberInfoByAccount(String.valueOf(uid));
|
||||
if (roomQueueInfo == null || roomQueueInfo.mChatRoomMember == null) return false;
|
||||
return mCurrentRoomInfo != null &&
|
||||
mCurrentRoomInfo.getPlayType() == RoomInfo.PLAY_TYPE_DATING &&
|
||||
roomQueueInfo.mChatRoomMember.isHasSelectUser();
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,52 @@
|
||||
package com.yizhuan.xchat_android_core.room.bean
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
data class DatingNotifyInfo(
|
||||
|
||||
/** 操作用户uid */
|
||||
val uid: Long = 0,
|
||||
|
||||
/** 操作用户昵称 */
|
||||
val nickname: String = "",
|
||||
|
||||
/** 操作用户麦位 */
|
||||
val position: Int = -1,
|
||||
|
||||
/** 操作用户性别 */
|
||||
val gender: Int = 0,
|
||||
|
||||
/** 操作用户头像 */
|
||||
val avatar: String = "",
|
||||
|
||||
/** 目标用户uid */
|
||||
val targetUid: Long = 0,
|
||||
|
||||
/** 目标用户昵称 */
|
||||
val targetNickname: String = "",
|
||||
|
||||
/** 目标用户麦位 */
|
||||
val targetPosition: Int = -1,
|
||||
|
||||
/** 目标用户性别 */
|
||||
val targetGender: Int = 0,
|
||||
|
||||
/** 目标用户头像 */
|
||||
val targetAvatar: String = "",
|
||||
|
||||
/** 相亲步骤变更提示文案 */
|
||||
val content: String = "",
|
||||
|
||||
/** 是否有互选对象 */
|
||||
val hasHeart: Boolean = false,
|
||||
|
||||
/** svga地址 */
|
||||
val svgaUrl: String = "",
|
||||
|
||||
/** svga时长 */
|
||||
val svgaSecond: Int = 0,
|
||||
|
||||
/** 是否有选择的对象 */
|
||||
val hasSelectUser: Boolean = false
|
||||
|
||||
) : Serializable
|
@@ -0,0 +1,26 @@
|
||||
package com.yizhuan.xchat_android_core.room.event;
|
||||
|
||||
public class DatingSelectUserEvent {
|
||||
|
||||
private long chosenUserId;
|
||||
private long electorUserId;
|
||||
private long roomUserId;
|
||||
|
||||
public DatingSelectUserEvent(long chosenUserId, long electorUserId, long roomUserId) {
|
||||
this.chosenUserId = chosenUserId;
|
||||
this.electorUserId = electorUserId;
|
||||
this.roomUserId = roomUserId;
|
||||
}
|
||||
|
||||
public long getChosenUserId() {
|
||||
return chosenUserId;
|
||||
}
|
||||
|
||||
public long getElectorUserId() {
|
||||
return electorUserId;
|
||||
}
|
||||
|
||||
public long getRoomUserId() {
|
||||
return roomUserId;
|
||||
}
|
||||
}
|
@@ -576,4 +576,18 @@ public class AvRoomModel extends RoomBaseModel implements IAvRoomModel {
|
||||
return mRoomService.apiGetWelcomeConfig(toUid)
|
||||
.compose(RxHelper.handleCommon());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<String> upMicroPhone(int micPosition, String uId, String roomId) {
|
||||
return mRoomService.upMicroPhone(micPosition, uId, roomId)
|
||||
.compose(RxHelper.handleStringData())
|
||||
.compose(RxHelper.handleSchedulers());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<String> downMicroPhone(int micPosition, String uId, String roomId) {
|
||||
return mRoomService.downMicroPhone(micPosition, uId, roomId)
|
||||
.compose(RxHelper.handleStringData())
|
||||
.compose(RxHelper.handleSchedulers());
|
||||
}
|
||||
}
|
||||
|
@@ -203,42 +203,24 @@ public class HomePartyModel extends RoomBaseModel implements IHomePartyModel {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<String> datingNext(long roomUserId) {
|
||||
return mHomePartyService.datingNext(roomUserId)
|
||||
.compose(RxHelper.handleSchedulers())
|
||||
.compose(RxHelper.handleStringData());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<String> datingSelect(long chosenUserId, long electorUserId, long roomUserId) {
|
||||
return mHomePartyService.datingSelect(chosenUserId, electorUserId, roomUserId)
|
||||
.compose(RxHelper.handleSchedulers())
|
||||
.compose(RxHelper.handleStringData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 轰趴房间服务器相关接口
|
||||
*/
|
||||
private interface HomePartyService {
|
||||
/**
|
||||
* 上麦接口
|
||||
*
|
||||
* @param micPosition 上麦的位置
|
||||
* @param uId 上麦的用户id
|
||||
* @param roomId 房间id
|
||||
* @param ticket
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("room/mic/upmic")
|
||||
Observable<ServiceResult<String>> upMicroPhone(@Field("position") int micPosition,
|
||||
@Field("micUid") String uId,
|
||||
@Field("roomId") String roomId,
|
||||
@Field("ticket") String ticket);
|
||||
|
||||
|
||||
/**
|
||||
* 下麦接口
|
||||
*
|
||||
* @param micPosition 上麦的位置
|
||||
* @param uId 上麦的用户id
|
||||
* @param roomId 房间id
|
||||
* @param ticket
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("room/mic/downmic")
|
||||
Observable<ServiceResult<String>> downMicroPhone(@Field("position") int micPosition,
|
||||
@Field("micUid") String uId,
|
||||
@Field("roomId") String roomId,
|
||||
@Field("ticket") String ticket);
|
||||
|
||||
/**
|
||||
* 锁坑,开坑操作
|
||||
@@ -276,58 +258,26 @@ public class HomePartyModel extends RoomBaseModel implements IHomePartyModel {
|
||||
@Field("uid") long uid);
|
||||
|
||||
/**
|
||||
* 邀请上麦
|
||||
* 相亲开始下一步
|
||||
*
|
||||
* @param micPosition
|
||||
* @param micUid 被邀上麦用户uid
|
||||
* @param roomId
|
||||
* @param roomUid 房主或管理员UID
|
||||
* @param ticket
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("room/mic/invitemic")
|
||||
Observable<ServiceResult<String>> inviteMictoPhone(@Field("position") int micPosition,
|
||||
@Field("micUid") String micUid,
|
||||
@Field("roomId") String roomId,
|
||||
@Field("roomUid") String roomUid,
|
||||
@Field("ticket") String ticket);
|
||||
@POST("blind-date/state")
|
||||
Single<ServiceResult<String>> datingNext(@Field("roomUserId") long roomUserId);
|
||||
|
||||
/**
|
||||
* 踢人下麦
|
||||
* 相亲选人
|
||||
*
|
||||
* @param micPosition
|
||||
* @param micUid 被踢下麦用户uid
|
||||
* @param roomId
|
||||
* @param roomUid 房主或管理员UID
|
||||
* @param ticket
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("room/mic/kickmic")
|
||||
Observable<ServiceResult<String>> kickMicroPhone(@Field("position") int micPosition,
|
||||
@Field("micUid") long micUid,
|
||||
@Field("roomId") long roomId,
|
||||
@Field("roomUid") long roomUid,
|
||||
@Field("ticket") String ticket);
|
||||
|
||||
/**
|
||||
* 邀请上麦
|
||||
*
|
||||
* @param micUid 上麦用户uid
|
||||
* @param roomId 房间ID
|
||||
* @param position
|
||||
* @param ticket
|
||||
* @param roomUid 房主或管理员UID
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("room/mic/invitemic")
|
||||
Observable<ServiceResult<String>> inviteMicroPhone(@Field("micUid") long micUid,
|
||||
@Field("roomId") long roomId,
|
||||
@Field("position") int position,
|
||||
@Field("ticket") String ticket,
|
||||
@Field("roomUid") long roomUid);
|
||||
@POST("blind-date/connection")
|
||||
Single<ServiceResult<String>> datingSelect(@Field("chosenUserId") long chosenUserId,
|
||||
@Field("electorUserId") long electorUserId,
|
||||
@Field("roomUserId") long roomUserId);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -1028,6 +1028,35 @@ public class RoomBaseModel extends BaseModel implements IRoomBaseModel {
|
||||
@GET("/welcome/room/msg/getOne")
|
||||
Single<ServiceResult<RoomWelcomeConfig>> apiGetWelcomeConfig(@Query("toUid") long toUid);
|
||||
|
||||
/**
|
||||
* 上麦接口
|
||||
*
|
||||
* @param micPosition 上麦的位置
|
||||
* @param uId 上麦的用户id
|
||||
* @param roomId 房间id
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("room/mic/upmic")
|
||||
Single<ServiceResult<String>> upMicroPhone(@Field("position") int micPosition,
|
||||
@Field("micUid") String uId,
|
||||
@Field("roomId") String roomId);
|
||||
|
||||
|
||||
/**
|
||||
* 下麦接口
|
||||
*
|
||||
* @param micPosition 上麦的位置
|
||||
* @param uId 上麦的用户id
|
||||
* @param roomId 房间id
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("room/mic/downmic")
|
||||
Single<ServiceResult<String>> downMicroPhone(@Field("position") int micPosition,
|
||||
@Field("micUid") String uId,
|
||||
@Field("roomId") String roomId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@@ -139,4 +139,27 @@ public interface IAvRoomModel extends IModel {
|
||||
*/
|
||||
Single<ServiceResult<List<SearchRoomInfo>>> roomSearch(String key);
|
||||
|
||||
/**
|
||||
* 上麦
|
||||
*
|
||||
* @param micPosition 上麦的位置
|
||||
* @param uId 上麦的用户id
|
||||
* @param roomId 房间id
|
||||
* @return
|
||||
*/
|
||||
|
||||
Single<String> upMicroPhone(int micPosition, String uId, String roomId);
|
||||
|
||||
|
||||
/**
|
||||
* 下麦
|
||||
*
|
||||
* @param micPosition 上麦的位置
|
||||
* @param uid 上麦的用户id
|
||||
* @param roomId 房间id
|
||||
* @return
|
||||
*/
|
||||
|
||||
Single<String> downMicroPhone(int micPosition, String uid, String roomId);
|
||||
|
||||
}
|
||||
|
@@ -62,4 +62,8 @@ public interface IHomePartyModel extends IModel {
|
||||
* @param ticket
|
||||
*/
|
||||
Single<String> openOrCloseMicroPhone(int micPosition, int state, long roomUid, String ticket);
|
||||
|
||||
Single<String> datingNext(long roomUserId);
|
||||
|
||||
Single<String> datingSelect(long chosenUserId, long electorUserId, long roomUserId);
|
||||
}
|
||||
|
Reference in New Issue
Block a user