更改事件
This commit is contained in:
parent
93543545c5
commit
62db69b1d4
|
|
@ -17,7 +17,7 @@ object VididinEvents {
|
||||||
|
|
||||||
|
|
||||||
const val Event_AD_TASK_TYPE_Convert_Gold_2_Cash = 800
|
const val Event_AD_TASK_TYPE_Convert_Gold_2_Cash = 800
|
||||||
const val Event_AD_TASK_TYPE_Watch_Ad_For_Gold = 801
|
const val Event_AD_TASK_TYPE_Watch_Ad_Earn_Gold = 801
|
||||||
const val Event_AD_TASK_TYPE_Watch_Ad_Daily = 802
|
const val Event_AD_TASK_TYPE_Watch_Ad_Daily = 802
|
||||||
const val Event_AD_TASK_TYPE_Withdraw = 803
|
const val Event_AD_TASK_TYPE_Withdraw = 803
|
||||||
const val Event_AD_TASK_TYPE_Complement = 804
|
const val Event_AD_TASK_TYPE_Complement = 804
|
||||||
|
|
|
||||||
|
|
@ -58,8 +58,11 @@ class WatchAdActivity : AppViewsActivity<ViewBinding, UiState, ViewModel>(), OnT
|
||||||
|
|
||||||
private fun notifyAdWatchFinish() {
|
private fun notifyAdWatchFinish() {
|
||||||
NotifyMan.instance().sendEvent(mTaskType, null)
|
NotifyMan.instance().sendEvent(mTaskType, null)
|
||||||
|
|
||||||
|
if (mTaskType != VididinEvents.Event_AD_TASK_TYPE_Watch_Ad_Earn_Gold) {
|
||||||
NotifyMan.instance().sendEvent(VididinEvents.Event_Finish_One_Ad, NotifyMan.NotifyData(1))
|
NotifyMan.instance().sendEvent(VididinEvents.Event_Finish_One_Ad, NotifyMan.NotifyData(1))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun stateCounter() {
|
private fun stateCounter() {
|
||||||
mCountDownTimer = object : CountDownTimer(5000, 1000) {
|
mCountDownTimer = object : CountDownTimer(5000, 1000) {
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ class TasksFragment : AppViewsFragment<ViewBinding, UiState, ViewModel>(), OnTab
|
||||||
}
|
}
|
||||||
|
|
||||||
llTaskWatchVideo->{
|
llTaskWatchVideo->{
|
||||||
WatchAdDialog(requireActivity(), VididinEvents.Event_AD_TASK_TYPE_Watch_Ad_For_Gold, null).show()
|
WatchAdDialog(requireActivity(), VididinEvents.Event_AD_TASK_TYPE_Watch_Ad_Earn_Gold, null).show()
|
||||||
}
|
}
|
||||||
|
|
||||||
llTaskGame->{
|
llTaskGame->{
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ class HomeItemFragment : AppViewsEmptyViewModelFragment<ViewBinding>() {
|
||||||
Router.Benefit.startActivity(requireActivity())
|
Router.Benefit.startActivity(requireActivity())
|
||||||
},
|
},
|
||||||
PopMenuIconView.MenuItem(R.mipmap.home_menu_2) {
|
PopMenuIconView.MenuItem(R.mipmap.home_menu_2) {
|
||||||
WatchAdDialog(requireActivity(), VididinEvents.Event_AD_TASK_TYPE_Watch_Ad_For_Gold, null).show()
|
WatchAdDialog(requireActivity(), VididinEvents.Event_AD_TASK_TYPE_Watch_Ad_Earn_Gold, null).show()
|
||||||
},
|
},
|
||||||
PopMenuIconView.MenuItem(R.mipmap.home_menu_3) {
|
PopMenuIconView.MenuItem(R.mipmap.home_menu_3) {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -83,12 +83,12 @@ class TaskManager private constructor() {
|
||||||
AccountManager.convertGold2Cash()
|
AccountManager.convertGold2Cash()
|
||||||
}
|
}
|
||||||
|
|
||||||
VididinEvents.Event_AD_TASK_TYPE_Watch_Ad_For_Gold -> {
|
VididinEvents.Event_AD_TASK_TYPE_Watch_Ad_Earn_Gold -> {
|
||||||
// TODO - add gold for user
|
// TODO - add gold for user
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, VididinEvents.Event_AD_TASK_TYPE_Convert_Gold_2_Cash, VididinEvents.Event_AD_TASK_TYPE_Watch_Ad_For_Gold)
|
}, VididinEvents.Event_AD_TASK_TYPE_Convert_Gold_2_Cash, VididinEvents.Event_AD_TASK_TYPE_Watch_Ad_Earn_Gold)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ import kotlinx.serialization.Serializable
|
||||||
@Serializable
|
@Serializable
|
||||||
abstract class BaseTaskState {
|
abstract class BaseTaskState {
|
||||||
companion object {
|
companion object {
|
||||||
const val STATE_ONGOING = 1
|
const val STATE_ONGOING = 0
|
||||||
const val STATE_FINISH = 2
|
const val STATE_FINISH = 1
|
||||||
const val STATE_CLAIMED = 3
|
const val STATE_CLAIMED = 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue