feat:增加首充成功后房间banner刷新
This commit is contained in:
@@ -66,17 +66,21 @@ class RoomBannerWidget : FrameLayoutRoomWidget {
|
||||
|
||||
override fun onInitialize(roomView: RoomView, roomContext: RoomContext) {
|
||||
super.onInitialize(roomView, roomContext)
|
||||
if (roomContext.getRoomInfo()?.type == RoomInfo.ROOMTYPE_GAME) {
|
||||
refreshData(true)
|
||||
} else {
|
||||
refreshData(false)
|
||||
}
|
||||
refreshData()
|
||||
}
|
||||
|
||||
fun disabledIndicator() {
|
||||
setIndicatorEnabled(false)
|
||||
}
|
||||
|
||||
fun refreshData() {
|
||||
if (RoomContext.get()?.getRoomInfo()?.type == RoomInfo.ROOMTYPE_GAME) {
|
||||
refreshData(true)
|
||||
} else {
|
||||
refreshData(false)
|
||||
}
|
||||
}
|
||||
|
||||
private fun refreshData(isGameRoom: Boolean) {
|
||||
val disposable = if (isGameRoom) {
|
||||
AvRoomModel.get().gameRoomBannerList
|
||||
|
@@ -157,6 +157,8 @@ class GameRoomFragment : BaseRoomFragment<IGameRoomView?, GameRoomPresenter?>(),
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
fun onFirstRechargeEvent(event: FirstChargeEvent) {
|
||||
// banner里可能有首充入口:刷新下
|
||||
gameBinding.bannerWidget.refreshData()
|
||||
FirstChargePrizeDialog(
|
||||
requireContext(),
|
||||
event.chargeProdTitle,
|
||||
|
@@ -945,7 +945,8 @@ public class HomePartyRoomFragment extends BaseRoomFragment<IHomePartyView, Home
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onFirstRechargeEvent(FirstChargeEvent event) {
|
||||
// gameBinding.ivFirstChargeEnter.setVisibility(View.GONE);
|
||||
// banner里可能有首充入口:刷新下
|
||||
gameBinding.bannerWidget.refreshData();
|
||||
new FirstChargePrizeDialog(requireContext(), event.getChargeProdTitle(), event.getFirstChargeRewardList()).openDialog();
|
||||
}
|
||||
|
||||
|
@@ -28,8 +28,6 @@ import com.yizhuan.erban.databinding.FragmentSingleRoomBinding
|
||||
import com.yizhuan.erban.fansteam.FansTeamJoinActivity
|
||||
import com.yizhuan.erban.fansteam.FansTeamJoinedActivity
|
||||
import com.yizhuan.erban.fansteam.FansTeamViewModel
|
||||
import com.yizhuan.erban.treasure_box.widget.GoldBoxHelper
|
||||
import com.yizhuan.erban.ui.utils.load
|
||||
import com.yizhuan.erban.ui.webview.CommonWebViewActivity
|
||||
import com.yizhuan.erban.ui.webview.DialogWebViewActivity
|
||||
import com.yizhuan.tutu.music.widget.MusicPlayerView
|
||||
@@ -244,7 +242,8 @@ class SingleRoomFragment : BaseRoomFragment<ISingleRoomView?, SingleRoomPresente
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
fun onFirstRechargeEvent(event: FirstChargeEvent) {
|
||||
// gameBinding.ivFirstChargeEnter.visibility = View.GONE
|
||||
// banner里可能有首充入口:刷新下
|
||||
gameBinding.bannerWidget.refreshData()
|
||||
FirstChargePrizeDialog(
|
||||
requireContext(),
|
||||
event.chargeProdTitle,
|
||||
|
@@ -14,9 +14,7 @@ import com.yizhuan.erban.treasure_box.widget.GoldBoxHelper
|
||||
import com.yizhuan.erban.treasurefairy.HomeFairyActivity
|
||||
import com.yizhuan.erban.ui.utils.load
|
||||
import com.yizhuan.erban.ui.webview.CommonWebViewActivity
|
||||
import com.yizhuan.erban.ui.webview.DialogWebViewActivity
|
||||
import com.yizhuan.erban.ui.webview.room_banner.RoomWebDialogActivity
|
||||
import com.yizhuan.erban.ui.widget.rollviewpager.Util
|
||||
import com.yizhuan.erban.utils.CommonJumpHelper
|
||||
import com.yizhuan.xchat_android_core.room.bean.RoomIcon
|
||||
import com.yizhuan.xchat_android_core.room.model.AvRoomModel
|
||||
|
Reference in New Issue
Block a user