Commit b297a39c authored by jyx's avatar jyx

逻辑优化

parent d592711a
......@@ -184,7 +184,6 @@ dependencies {
implementation 'com.github.SheHuan:NiceImageView:1.0.5'
// 工具类
// gson
implementation 'com.google.code.gson:gson:2.8.1'
......@@ -193,7 +192,7 @@ dependencies {
// 三方接入
// leakcanary
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.4'
// debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.4'
// 极光推送
implementation 'cn.jiguang.sdk:jpush:3.6.6'
implementation 'cn.jiguang.sdk:jcore:2.3.8'
......@@ -263,8 +262,7 @@ dependencies {
implementation(name: 'scenead-2.2', ext: 'aar')
implementation 'com.just.agentweb:agentweb:4.1.2'
// 喜马拉雅 已集成
// testImplementation 'junit:junit:4.13'
// androidTestImplementation 'androidx.test.ext:junit:1.1.2'
......
......@@ -243,7 +243,7 @@ public class MintsApplication extends MultiDexApplication {
*/
public void initUm(Context context) {
try {
/**
/*
* 参数4:设备类型,必须参数,传参数为UMConfigure.DEVICE_TYPE_PHONE则表示手机;传参数为UMConfigure.DEVICE_TYPE_BOX则表示盒子;默认为手机。
* 参数5:Push推送业务的secret,需要集成Push功能时必须传入Push的secret,否则传空。
*/
......
......@@ -157,7 +157,6 @@ public class VedioAdingManager {
// 根据权重获取广告类型
String adType;
if (isHighWeight) {
setVedioAdingListener(null);
adType = getHighWeight();
} else {
adType = getRandomWeight();
......
......@@ -10,16 +10,16 @@ object AppTryPlayManager {
// 第一次打开时间
// private var openTime = 0L
private var currentPkg = ""
// private var currentPkg = ""
fun toTryPlay(pkg: String) {
if (currentPkg != pkg) {
// if (currentPkg != pkg) {
// openTime = AppUtil.getAppUseTime(MintsApplication.getContext(), pkg)
AppUtil.openThirdApp(MintsApplication.getContext(), pkg)
AppUtil.openThirdApp(MintsApplication.getContext(), pkg)
// val eventMessage = EventMessage(Constant.IS_HIGH_TASK, pkg)
// RxBus.getDefault().postSticky(eventMessage)
currentPkg = pkg
}
// currentPkg = pkg
// }
}
fun getTryPlayIsOK(pkg: String): Boolean {
......
......@@ -54,6 +54,8 @@ import net.grandcentrix.tray.AppPreferences
import java.math.BigDecimal
import java.util.*
private val TAG = MyFragment::class.java.simpleName
/**
* 描述:我
* 作者:孟崔广
......@@ -62,8 +64,6 @@ import java.util.*
@SuppressLint("SetTextI18n")
class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshListener, View.OnClickListener, AdapterView.OnItemClickListener {
private val TAG = MyFragment::class.java.simpleName
private val ps by lazy { AppPreferences(context) }
private val myPresenter by lazy { MyPresenter() }
private val userManager by lazy { UserManager.getInstance() }
......@@ -470,12 +470,16 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
bundle.putInt(Constant.MAIN_CUR_COIN, taskBean.otherConfig.coin)
bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_HIGH_ACTIVITY)
readyGo(AwardActivity::class.java, bundle)
AppConfig.isHighTask = false
mCurrentPkg = null
}
3 -> {
if (mCurrentPkg == null) {
showToast("网络出小差儿了~")
myPresenter.setHighTaskType("0")
myPresenter.getAutoUserHallBaseMsg()
AppConfig.isHighTask = false
} else {
AppConfig.isHighTask = true
AppTryPlayManager.toTryPlay(mCurrentPkg!!)
......@@ -883,7 +887,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
}
private fun videoAdingSuccess(adType: String) {
if (activity != null && !activity!!.isFinishing && !AppConfig.isHighTask) {
if (activity != null && !activity!!.isFinishing) {
val bundle = Bundle()
if (TextUtils.equals(carrierType, Constant.CARRIER_SIGNIN_HOMEPAGE_CARD)) {
bundle.putInt(Constant.MAIN_CUR_COIN, curSignCoin * 2)
......@@ -891,6 +895,9 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
readyGo(AwardActivity::class.java, bundle)
return
}
if (mCurrentPkg != null) {
return
}
userConfig?.let {
for (autoListBean in it.autoList) {
......@@ -1100,7 +1107,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
}
when (v.id) {
R.id.dialog_btn_left -> {
cdaa!!.dismiss()
}
R.id.dialog_btn_right -> {
cdaa!!.dismiss()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment