|
@@ -53,8 +53,6 @@ class UserRoomFragment : BaseComFragment<FragmentBaseComBinding>() {
|
|
|
private var isSameDate:Boolean = false
|
|
|
override fun initOther() {
|
|
|
super.initOther()
|
|
|
- isSameDate = SpUtil.readString("last_visit_date") == TimeUtil.getCurrentDate()
|
|
|
- SpUtil.putString("last_visit_date", TimeUtil.getCurrentDate())
|
|
|
binding.ivBenefit.setOnClickListener(object : NoDoubleClickListener() {
|
|
|
override fun onClick() {
|
|
|
openBenefitBagDialog()
|
|
@@ -231,6 +229,12 @@ class UserRoomFragment : BaseComFragment<FragmentBaseComBinding>() {
|
|
|
|
|
|
}.show(parentFragmentManager , "EnterPasswordDialog")
|
|
|
}
|
|
|
+
|
|
|
+ payVm.benefitLiveData.observe(this){
|
|
|
+ if (it.is_benefit==0&&it.is_pop_discount_package==0){
|
|
|
+ BenefitBagDialog.newInstance().show(childFragmentManager, "BenefitBagDialog")
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
fun dismissDialog() {
|
|
@@ -283,7 +287,7 @@ class UserRoomFragment : BaseComFragment<FragmentBaseComBinding>() {
|
|
|
}
|
|
|
if (!isSameDate){
|
|
|
isSameDate = true
|
|
|
- openBenefitBagDialog()
|
|
|
+ payVm.getBenefit()
|
|
|
}
|
|
|
}
|
|
|
|