Merge remote-tracking branch 'origin/branch_new' into branch_new
This commit is contained in:
@@ -192,7 +192,6 @@ import java.lang.ref.WeakReference
|
||||
import java.nio.charset.StandardCharsets
|
||||
import java.util.Arrays
|
||||
import java.util.Date
|
||||
import java.util.concurrent.Executors
|
||||
import java.util.concurrent.TimeUnit
|
||||
import java.util.stream.Collectors
|
||||
|
||||
@@ -602,6 +601,12 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
)
|
||||
}
|
||||
|
||||
mBinding?.clGold?.setOnClickListener { view : View ->
|
||||
this.onClick(
|
||||
view
|
||||
)
|
||||
}
|
||||
|
||||
mBinding!!.inputMenu1.performClick()
|
||||
|
||||
V2TIMManager.getConversationManager()
|
||||
@@ -1098,6 +1103,16 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
SpUtil.getInstance().setIntValue("is_pk", mRoomInfoResp?.room_info?.is_pk ?: 1)
|
||||
}
|
||||
|
||||
// TODO: 小黑屋充值
|
||||
fun refillGold(){
|
||||
RechargeDialogFragment.show(roomId, null, supportFragmentManager, "", "")
|
||||
}
|
||||
|
||||
// TODO: 充值赋值
|
||||
fun goldAssignment(gold_coin: String){
|
||||
mBinding?.tvGold?.text = "余额:"+ gold_coin
|
||||
|
||||
}
|
||||
|
||||
private fun checkAndRestoreMinimizeState() {
|
||||
val prefs = getSharedPreferences("room_minimize_state", Context.MODE_PRIVATE)
|
||||
@@ -2885,6 +2900,8 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
mBinding!!.svgaGift.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
} else if (id == R.id.cl_gold){
|
||||
refillGold()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3078,6 +3095,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
if (voive) View.VISIBLE else View.VISIBLE
|
||||
mBinding?.rlPrivateMsg?.visibility = View.VISIBLE
|
||||
mBinding?.rlEffects?.visibility = View.VISIBLE
|
||||
mBinding?.clGold?.visibility= View.VISIBLE
|
||||
|
||||
if (SpUtil.getOpenEffect() == 1) {
|
||||
mBinding?.ivIcon?.setImageResource(com.xscm.moduleutil.R.mipmap.icon_close_effects)
|
||||
@@ -3110,6 +3128,8 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
if (voive) View.VISIBLE else View.GONE
|
||||
mBinding?.rlPrivateMsg?.visibility = View.GONE
|
||||
mBinding?.rlEffects?.visibility = View.GONE
|
||||
mBinding?.clGold?.visibility= View.GONE
|
||||
|
||||
}
|
||||
|
||||
/** 这里是当进入电影放房的时候,如果是排麦模式,并且不是电影放的时候,就隐藏排麦视图 */
|
||||
|
||||
@@ -11,7 +11,7 @@ class PrivateContacts {
|
||||
|
||||
interface View : IView<Activity>{
|
||||
|
||||
fun wallet(list:List<String>,walletBean: WalletBean?)
|
||||
fun wallet(walletBean: WalletBean?)
|
||||
|
||||
fun sendGiftResult(success:Boolean,idx: Int)
|
||||
|
||||
@@ -29,7 +29,7 @@ class PrivateContacts {
|
||||
|
||||
fun exitRoom(roomId: String?, userId: String?)
|
||||
|
||||
fun wallet(list:List<String>)
|
||||
fun wallet()
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -203,6 +203,7 @@ class RoomPrivateFragment(var mRoomInfoResp: RoomInfoResp?) :
|
||||
|
||||
override fun initData() {
|
||||
MvpPre?.getGiftList(mRoomId)
|
||||
MvpPre?.wallet()
|
||||
}
|
||||
|
||||
fun roomInfoUpdate(roomInfoResp: RoomInfoResp) {
|
||||
@@ -229,7 +230,10 @@ class RoomPrivateFragment(var mRoomInfoResp: RoomInfoResp?) :
|
||||
}
|
||||
|
||||
|
||||
override fun wallet(list: List<String>, walletBean: WalletBean?) {
|
||||
override fun wallet(walletBean: WalletBean?) {
|
||||
if (ActivityUtils.getTopActivity() is RoomActivity) {
|
||||
(ActivityUtils.getTopActivity() as RoomActivity).goldAssignment(walletBean?.coin.toString())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -243,7 +247,7 @@ class RoomPrivateFragment(var mRoomInfoResp: RoomInfoResp?) :
|
||||
itemTextView.visibility = View.VISIBLE
|
||||
return
|
||||
}
|
||||
|
||||
MvpPre?.wallet()
|
||||
val itemImage = giftViewList[idx]
|
||||
val itemTextView = giftTViewList[idx]
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ class PrivatePresenter(context: Context, val view: PrivateContacts.View?) :
|
||||
}
|
||||
|
||||
|
||||
override fun wallet(list:List<String>) {
|
||||
override fun wallet() {
|
||||
RetrofitClient.getInstance().wallet(object : BaseObserver<WalletBean?>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
addDisposable(d)
|
||||
@@ -118,9 +118,11 @@ class PrivatePresenter(context: Context, val view: PrivateContacts.View?) :
|
||||
if (MvpRef == null) {
|
||||
MvpRef = WeakReference(view)
|
||||
}
|
||||
MvpRef.get()?.wallet(list,walletBean)
|
||||
MvpRef.get()?.wallet(walletBean)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user