Commit 11c568d6 authored by mengcuiguang2's avatar mengcuiguang2

代码优化

parent 326e87ad
......@@ -15,22 +15,22 @@ object TalkingDataManager {
fun init(application:Application) {
try {
//打开日志
TCAgent.LOG_ON = BuildConfig.LOG_DEBUG
/**
* 动态获取渠道ID(类似友盟)
* AppID说是xml文件里的密钥?
*/
TCAgent.init(application, APP_KEY
, MateUtils.getAppMetaData(application, "CHANNEL_NAME"))
/**
* true-开启自动捕获错误
*/
TCAgent.setReportUncaughtExceptions(true)
} catch (e: Exception) {
e.printStackTrace()
}
// try {
// //打开日志
// TCAgent.LOG_ON = BuildConfig.LOG_DEBUG
// /**
// * 动态获取渠道ID(类似友盟)
// * AppID说是xml文件里的密钥?
// */
// TCAgent.init(application, APP_KEY
// , MateUtils.getAppMetaData(application, "CHANNEL_NAME"))
// /**
// * true-开启自动捕获错误
// */
// TCAgent.setReportUncaughtExceptions(true)
// } catch (e: Exception) {
// e.printStackTrace()
// }
}
fun onResume(cxt:Context,name:String){
......
......@@ -49,6 +49,7 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
val luckyIndexMap: MutableMap<Int, String> = HashMap()
private var yoyo: YoYo.YoYoString? = null
private var isInitLuckyData = false
private var isTurnLuckyPage = false
private var nineShowBean: NineShowBean? = null
var carrierType = Constant.CARRIERTYPE_NINE
......@@ -93,6 +94,11 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
showAd()
}
if(isTurnLuckyPage){
isTurnLuckyPage=false
clickTurn()
}
if (!TextUtils.isEmpty(userManager?.userID)) {
myPresenter.showTurn()
myPresenter.getMyInfo()
......@@ -359,6 +365,7 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
val luckyFirst =
AppPreferencesManager.get().getBoolean(Constant.LUCKY_MY_FIRST, false)
if (!luckyFirst) {
isTurnLuckyPage=true
AppPreferencesManager.get().put(Constant.LUCKY_MY_FIRST, true)
val bundle = Bundle()
bundle.putInt(NineKnowActivity.COMPLETE, nineShowBean!!.complete)
......
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