观看ad 事件发送
This commit is contained in:
parent
0e034f340d
commit
6f650df200
|
|
@ -11,7 +11,8 @@ object VididinEvents {
|
|||
const val Event_Finish_One_Video = 701
|
||||
const val Event_Finish_One_Ad = 702
|
||||
|
||||
const val Event_Toady_Watched_Total = 703
|
||||
const val Event_Toady_Watched_Video_Total = 703
|
||||
const val Event_Toady_Watched_Ad_Total = 704
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import androidx.core.view.updatePadding
|
|||
import com.ama.core.architecture.appBase.AppViewsActivity
|
||||
import com.ama.core.architecture.util.AndroidUtil
|
||||
import com.ama.core.architecture.util.eventbus.NotifyMan
|
||||
import com.gamedog.vididin.VididinEvents
|
||||
import com.gamedog.vididin.main.interfaces.OnTabStyleListener
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import kotlin.getValue
|
||||
|
|
@ -57,6 +58,7 @@ class WatchAdActivity : AppViewsActivity<ViewBinding, UiState, ViewModel>(), OnT
|
|||
|
||||
private fun notifyAdWatchFinish() {
|
||||
NotifyMan.instance().sendEvent(mTaskType, null)
|
||||
NotifyMan.instance().sendEvent(VididinEvents.Event_Finish_One_Ad, NotifyMan.NotifyData(1))
|
||||
}
|
||||
|
||||
private fun stateCounter() {
|
||||
|
|
|
|||
|
|
@ -207,12 +207,17 @@ class TasksFragment : AppViewsFragment<ViewBinding, UiState, ViewModel>(), OnTab
|
|||
updateUICashTotal()
|
||||
}
|
||||
|
||||
VididinEvents.Event_Toady_Watched_Total -> {
|
||||
VididinEvents.Event_Toady_Watched_Video_Total -> {
|
||||
updateDailyWatchVideoUI()
|
||||
}
|
||||
|
||||
VididinEvents.Event_Toady_Watched_Ad_Total -> {
|
||||
updateDailyWatchAdUI()
|
||||
}
|
||||
}
|
||||
}, VididinEvents.Event_Sign_State_Changed, VididinEvents.Event_Account_Cash_Changed,
|
||||
VididinEvents.Event_Account_Gold_Changed, VididinEvents.Event_Toady_Watched_Total)
|
||||
VididinEvents.Event_Account_Gold_Changed, VididinEvents.Event_Toady_Watched_Video_Total,
|
||||
VididinEvents.Event_Toady_Watched_Ad_Total)
|
||||
}
|
||||
|
||||
private fun updateDailySignButUI() {
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class DailyWatchAdTaskHelper : BaseTaskHelper<TaskStateWatchAd>() {
|
|||
}
|
||||
|
||||
private fun notifyEvents() {
|
||||
NotifyMan.instance().sendEvent(VididinEvents.Event_Toady_Watched_Total, null)
|
||||
NotifyMan.instance().sendEvent(VididinEvents.Event_Toady_Watched_Ad_Total, null)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class DailyWatchVideoTaskHelper : BaseTaskHelper<DailyStateWatchVideoBean>() {
|
|||
}
|
||||
|
||||
private fun notifyEvents() {
|
||||
NotifyMan.instance().sendEvent(VididinEvents.Event_Toady_Watched_Total, null)
|
||||
NotifyMan.instance().sendEvent(VididinEvents.Event_Toady_Watched_Video_Total, null)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<FrameLayout
|
||||
android:id="@+id/content_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_ad_counter"
|
||||
|
|
|
|||
|
|
@ -128,10 +128,6 @@ public class NotifyMan {
|
|||
public NotifyData(T data) {
|
||||
mData = data;
|
||||
}
|
||||
|
||||
public NotifyData(int type) {
|
||||
mEventType = type;
|
||||
}
|
||||
}
|
||||
|
||||
public static abstract class ICallback {
|
||||
|
|
|
|||
Loading…
Reference in New Issue