Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -153,7 +153,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
mCoinName = CommonAppConfig.getInstance().getCoinName();
|
||||
mIsAnchor = this instanceof LiveAnchorActivity;
|
||||
mPageContainer = (ViewGroup) findViewById(R.id.page_container);
|
||||
mPageContainer = findViewById(R.id.page_container);
|
||||
EventBus.getDefault().register(this);
|
||||
mDialogFragmentSet = new HashSet<>();
|
||||
//解压 美颜模型
|
||||
@@ -271,7 +271,6 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
@Override
|
||||
public void onEnterRoom(LiveEnterRoomBean bean) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
LiveUserGiftBean u = bean.getUserBean();
|
||||
if (!bean.getUserBean().getCar().getWords().equals("")) {
|
||||
bean.getLiveChatBean().setContent(bean.getUserBean().getCar().getWords());
|
||||
}
|
||||
@@ -286,9 +285,6 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
*/
|
||||
@Override
|
||||
public void onLeaveRoom(UserBean bean) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
// mLiveRoomViewHolder.removeUser(bean.getId());
|
||||
}
|
||||
if (mLiveLinkMicPresenter != null) {
|
||||
mLiveLinkMicPresenter.onAudienceLeaveRoom(bean);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.yunbao.live.activity;
|
||||
|
||||
import static com.yunbao.live.views.LivePlayRyViewHolder.Micing;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -35,6 +37,7 @@ import com.yunbao.common.bean.SlideInfoModel;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.dialog.EffectsSettingsDialog;
|
||||
import com.yunbao.common.dialog.LiveChargeDialogFragment;
|
||||
import com.yunbao.common.dialog.SlideSettingsDialog;
|
||||
import com.yunbao.common.event.FollowEvent;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.CommonHttpConsts;
|
||||
@@ -80,8 +83,6 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import static com.yunbao.live.views.LivePlayRyViewHolder.Micing;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/10/10.
|
||||
* 看直播
|
||||
@@ -160,6 +161,9 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
private void initView() {
|
||||
// 竖直滑动 ViewPager
|
||||
verticalViewPager = findViewById(R.id.view_pager);
|
||||
|
||||
verticalViewPager.setEnableScroll(IMLoginManager.get(mContext).isSlide());
|
||||
|
||||
}
|
||||
|
||||
public void setBackIndex(int backIndex) {
|
||||
@@ -197,7 +201,9 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
manager.micIngTypeTwo(mLiveBean, mLiveType, mLiveTypeVal);
|
||||
|
||||
} else {
|
||||
verticalViewPager.setEnableScroll(true);
|
||||
if (IMLoginManager.get(mContext).isSlide()){
|
||||
verticalViewPager.setEnableScroll(true);
|
||||
}
|
||||
mCurrentItem = position;
|
||||
Log.e(TAG, "mCurrentItem:" + mCurrentItem);
|
||||
if (mCurrentItem == itemModelList.size() - 1) {
|
||||
@@ -331,19 +337,17 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
* 打开礼物窗口
|
||||
*/
|
||||
public void openGiftWindow() {
|
||||
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
||||
public void run() {
|
||||
if (TextUtils.isEmpty(mLiveUid) || TextUtils.isEmpty(mStream)) {
|
||||
return;
|
||||
}
|
||||
LiveGiftDialogFragment fragment = new LiveGiftDialogFragment();
|
||||
fragment.setLiveGuardInfo(mLiveGuardInfo);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
bundle.putString(Constants.LIVE_STREAM, mStream);
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGiftDialogFragment");
|
||||
new Handler(Looper.getMainLooper()).post(() -> {
|
||||
if (TextUtils.isEmpty(mLiveUid) || TextUtils.isEmpty(mStream)) {
|
||||
return;
|
||||
}
|
||||
LiveGiftDialogFragment fragment = new LiveGiftDialogFragment();
|
||||
fragment.setLiveGuardInfo(mLiveGuardInfo);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
bundle.putString(Constants.LIVE_STREAM, mStream);
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGiftDialogFragment");
|
||||
});
|
||||
}
|
||||
|
||||
@@ -365,20 +369,18 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
if (TextUtils.isEmpty(mLiveUid) || TextUtils.isEmpty(mStream)) {
|
||||
return;
|
||||
}
|
||||
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
||||
public void run() {
|
||||
LiveGiftDialogFragment fragment = new LiveGiftDialogFragment();
|
||||
fragment.setLiveGuardInfo(mLiveGuardInfo);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
bundle.putString(Constants.LIVE_STREAM, mStream);
|
||||
bundle.putString(Constants.LIVE_WISH_GIFTID, giftId);
|
||||
if (for_by.equals("1")) {
|
||||
bundle.putString("by", "1");
|
||||
}
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGiftDialogFragment");
|
||||
new Handler(Looper.getMainLooper()).post(() -> {
|
||||
LiveGiftDialogFragment fragment = new LiveGiftDialogFragment();
|
||||
fragment.setLiveGuardInfo(mLiveGuardInfo);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
bundle.putString(Constants.LIVE_STREAM, mStream);
|
||||
bundle.putString(Constants.LIVE_WISH_GIFTID, giftId);
|
||||
if (for_by.equals("1")) {
|
||||
bundle.putString("by", "1");
|
||||
}
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGiftDialogFragment");
|
||||
});
|
||||
|
||||
}
|
||||
@@ -485,6 +487,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
super.onPause();
|
||||
manager.onPause();
|
||||
}
|
||||
|
||||
/**
|
||||
* 点亮
|
||||
*/
|
||||
@@ -815,6 +818,16 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
manager.onChat(chatBean, 1);
|
||||
|
||||
break;
|
||||
case SLIDE_SETTINGS:
|
||||
SlideSettingsDialog slideSettingsDialog = new SlideSettingsDialog();
|
||||
slideSettingsDialog.show(getSupportFragmentManager(), "SlideSettingsDialog");
|
||||
slideSettingsDialog.setCallBack(new SlideSettingsDialog.SlideSettingsCallBack() {
|
||||
@Override
|
||||
public void initSlide(boolean slide) {
|
||||
verticalViewPager.setEnableScroll(slide);
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
@@ -890,7 +903,6 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取侧边栏数据
|
||||
*/
|
||||
|
||||
@@ -9,13 +9,13 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.live.adapter.FunGamesAdapter;
|
||||
import com.yunbao.common.bean.ActiveModel;
|
||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.adapter.FunGamesAdapter;
|
||||
import com.yunbao.live.bean.LiveBean;
|
||||
import com.yunbao.live.event.LiveAudienceEvent;
|
||||
|
||||
@@ -144,6 +144,11 @@ public class LiveTotalDialog extends AbsDialogFragment {
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.ONLINE));
|
||||
dismiss();
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.slide_settings_layout), () -> {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.SLIDE_SETTINGS));
|
||||
dismiss();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -130,7 +130,9 @@ public class LiveAudienceEvent extends BaseModel {
|
||||
NOTICE(18, "系统通知"),
|
||||
ONLINE(19, "在线客服"),
|
||||
TRUMPET_NOTIFY(20, "全服喇叭"),
|
||||
RECOMMEND_CARD_NOTIFY(21, "贵族推荐通知");
|
||||
RECOMMEND_CARD_NOTIFY(21, "贵族推荐通知"),
|
||||
SLIDE_SETTINGS(22, "滑動設置")
|
||||
;
|
||||
|
||||
private int type;
|
||||
private String name;
|
||||
|
||||
Reference in New Issue
Block a user