Commit f892c982 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 82920b72
......@@ -317,7 +317,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
if (data != null && data.signMsg != null) {
signMsg = data.signMsg
}
if (signMsg == null) {
if (data?.signMsg == null) {
iv_main_sign.visibility = View.GONE
if (!isNoSignFlag && !isShowSignFlag) {
isNoSignFlag = true
......@@ -325,10 +325,10 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
}
} else {
iv_main_sign.visibility = View.VISIBLE
tv_main_signcash.text = "${signMsg!!.sumCash}元"
AppConfig.signCash1 = FormatUtil.sub(signMsg!!.surCash, signMsg!!.cashCashFirst)
AppConfig.signCash2 = FormatUtil.sub(AppConfig.signCash1, signMsg!!.cashCashSecond)
if (signMsg!!.signDay <= 7) {
tv_main_signcash.text = "${data!!.signMsg!!.sumCash}元"
AppConfig.signCash1 = FormatUtil.sub(data!!.signMsg!!.surCash, data!!.signMsg!!.cashCashFirst)
AppConfig.signCash2 = FormatUtil.sub(AppConfig.signCash1, data!!.signMsg!!.cashCashSecond)
if (data!!.signMsg!!.signDay <= 7) {
if (!isShowSignFlag && userInfo?.rewardFirst != 0) {
isShowSignFlag = true
......
......@@ -152,7 +152,7 @@ class RedpkgFragment : LazyLoadBaseFragment(), View.OnClickListener, RedpkgView
} else {
(requireActivity() as MainActivity).showTabView()
scrollBottom()
et_input?.requestFocus()
et_input?.clearFocus()
}
}
}
......
......@@ -25,7 +25,7 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
private static ForegroundOrBackground instance;
private int count = 0;
private long activityStoppedTime = 0;
private int tempAlipay=0;
private int tempAlipay = 0;
//获取当前最上层的activity
private static WeakReference<Activity> app_activity;
......@@ -102,8 +102,8 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
// if (diffInSeconds >= 10 && SplashManager.INSTANCE.isSuccessStatus()) {
//支付宝授权时不弹
if (AppConfig.alipayBackFalg) {
tempAlipay=tempAlipay+1;
if(tempAlipay==2){
tempAlipay = tempAlipay + 1;
if (tempAlipay >= 2) {
AppConfig.alipayBackFalg = false;
}
} else {
......
......@@ -65,6 +65,7 @@
android:text=" 10 "
android:textColor="@color/red"
android:textSize="26sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/tv_info3"
app:layout_constraintStart_toEndOf="@id/tv_info1"
......
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