移除AbsRoomFragment

This commit is contained in:
huangjian
2021-12-23 11:57:08 +08:00
parent 8f5ad1f1fe
commit e1319cc922
3 changed files with 12 additions and 45 deletions

View File

@@ -1,6 +1,14 @@
package com.yizhuan.erban.avroom.activity;
import static android.view.View.VISIBLE;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_ALL_SERVICE_GIFT;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_HEADER_TYPE_GIFT;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_LUCKY_GIFT;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_LUCKY_GIFT_SERVER_NOTIFY;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_ROOM_PK;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_ROOM_PK_NOTIFY;
import android.annotation.SuppressLint;
import android.app.Dialog;
import android.content.Context;
@@ -15,7 +23,6 @@ import android.view.View;
import android.view.ViewStub;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
@@ -29,7 +36,6 @@ import androidx.viewpager.widget.ViewPager;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.netease.nim.uikit.StatusBarUtil;
import com.netease.nim.uikit.common.util.log.LogUtil;
import com.netease.nimlib.sdk.NIMSDK;
import com.netease.nimlib.sdk.Observer;
import com.netease.nimlib.sdk.chatroom.ChatRoomMessageBuilder;
@@ -43,7 +49,6 @@ import com.opensource.svgaplayer.SVGAVideoEntity;
import com.orhanobut.logger.Logger;
import com.tencent.bugly.crashreport.CrashReport;
import com.yizhuan.erban.R;
import com.yizhuan.erban.avroom.fragment.AbsRoomFragment;
import com.yizhuan.erban.avroom.fragment.HomePartyFragment;
import com.yizhuan.erban.avroom.fragment.InputPwdDialogFragment;
import com.yizhuan.erban.avroom.presenter.AvRoomPresenter;
@@ -51,12 +56,10 @@ import com.yizhuan.erban.avroom.presenter.HomePartyPresenter;
import com.yizhuan.erban.avroom.redpackage.RedPackageOpenDialog;
import com.yizhuan.erban.avroom.view.IAvRoomView;
import com.yizhuan.erban.base.BaseMvpActivity;
import com.yizhuan.erban.base.TitleBar;
import com.yizhuan.erban.common.widget.CircleImageView;
import com.yizhuan.erban.common.widget.CustomImageSpan;
import com.yizhuan.erban.common.widget.dialog.DialogManager;
import com.yizhuan.erban.home.adapter.FragmentViewPagerAdapter;
import com.yizhuan.erban.ui.login.AddUserInfoActivity;
import com.yizhuan.erban.ui.patriarch.help.LimitEnterRoomHelper;
import com.yizhuan.erban.ui.pay.ChargeActivity;
import com.yizhuan.erban.ui.user.UserInfoActivity;
@@ -76,7 +79,6 @@ import com.yizhuan.xchat_android_core.auth.AuthModel;
import com.yizhuan.xchat_android_core.auth.event.LogoutEvent;
import com.yizhuan.xchat_android_core.bean.BaseProtocol;
import com.yizhuan.xchat_android_core.gift.bean.LuckyBagNoticeInfo;
import com.yizhuan.xchat_android_core.home.bean.BannerInfo;
import com.yizhuan.xchat_android_core.im.custom.bean.RoomPKAttachment;
import com.yizhuan.xchat_android_core.im.custom.bean.RoomPkBean;
import com.yizhuan.xchat_android_core.im.custom.bean.RoomReceivedLuckyGiftAttachment;
@@ -112,7 +114,6 @@ import com.yizhuan.xchat_android_core.super_admin.util.SuperAdminUtil;
import com.yizhuan.xchat_android_core.user.UserModel;
import com.yizhuan.xchat_android_core.user.bean.UserInfo;
import com.yizhuan.xchat_android_core.utils.LogUtils;
import com.yizhuan.xchat_android_core.utils.SharedPreferenceUtils;
import com.yizhuan.xchat_android_core.utils.StringUtils;
import com.yizhuan.xchat_android_library.base.factory.CreatePresenter;
import com.yizhuan.xchat_android_library.utils.JavaUtil;
@@ -121,7 +122,6 @@ import com.yizhuan.xchat_android_library.utils.UIUtils;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import org.jetbrains.annotations.NotNull;
import java.lang.ref.WeakReference;
import java.net.MalformedURLException;
@@ -131,21 +131,9 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import io.reactivex.Observable;
import io.reactivex.Single;
import io.reactivex.SingleObserver;
import io.reactivex.SingleSource;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
import io.reactivex.functions.Function;
import static android.view.View.VISIBLE;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_ALL_SERVICE_GIFT;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_HEADER_TYPE_GIFT;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_LUCKY_GIFT;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_LUCKY_GIFT_SERVER_NOTIFY;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_ROOM_PK;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_ROOM_PK_NOTIFY;
/**
@@ -185,7 +173,7 @@ public class AVRoomActivity extends BaseMvpActivity<IAvRoomView, AvRoomPresenter
private ViewStub mVsNobleOpen;
private NobleOpenNoticeView mNobleOpenNoticeView;
private long roomUid;
private AbsRoomFragment mCurrentFragment;
private HomePartyFragment mCurrentFragment;
private InputPwdDialogFragment mPwdDialogFragment;
private RoomInfo mRoomInfo;
private ImageView ivHeadWear;
@@ -411,7 +399,7 @@ public class AVRoomActivity extends BaseMvpActivity<IAvRoomView, AvRoomPresenter
if (fragmentList != null && fragmentList.size() > 0
&& roomUidList != null && roomUidList.size() > 0) {
showLoadingDialog();
mCurrentFragment = (AbsRoomFragment) fragmentList.get(position);
mCurrentFragment = (HomePartyFragment) fragmentList.get(position);
//嗨聊房切换时清除公屏信息
EventBus.getDefault().post(new RoomClearScreenEvent());

View File

@@ -1,20 +0,0 @@
package com.yizhuan.erban.avroom.fragment;
import com.yizhuan.erban.base.BaseFragment;
import com.yizhuan.xchat_android_core.home.bean.BannerInfo;
import com.yizhuan.xchat_android_core.redPacket.bean.ActionDialogInfo;
import java.util.List;
/**
* @author chenran
* @date 2017/8/8
*/
public abstract class AbsRoomFragment extends BaseFragment {
public void onRoomOnlineNumberSuccess(int onlineNumber) {
}
}

View File

@@ -27,6 +27,7 @@ import com.yizhuan.erban.avroom.activity.RoomOnlineUserActivity;
import com.yizhuan.erban.avroom.adapter.SelectGameAdapter;
import com.yizhuan.erban.avroom.presenter.HomePartyPresenter;
import com.yizhuan.erban.avroom.widget.GiftV2View;
import com.yizhuan.erban.base.BaseFragment;
import com.yizhuan.erban.base.BaseMvpActivity;
import com.yizhuan.erban.common.widget.dialog.DialogManager;
import com.yizhuan.erban.databinding.FragmentChatroomGameMainBinding;
@@ -88,7 +89,7 @@ import io.reactivex.functions.Action;
*
* @author Administrator
*/
public class HomePartyFragment extends AbsRoomFragment implements View.OnClickListener, ShareDialog.OnShareDialogItemClick {
public class HomePartyFragment extends BaseFragment implements View.OnClickListener, ShareDialog.OnShareDialogItemClick {
private Fragment roomFragment;
@@ -691,9 +692,7 @@ public class HomePartyFragment extends AbsRoomFragment implements View.OnClickLi
roomFragment.onActivityResult(requestCode, resultCode, data);
}
@Override
public void onRoomOnlineNumberSuccess(int onlineNumber) {
super.onRoomOnlineNumberSuccess(onlineNumber);
updateOnlineNumberView(onlineNumber);
}