opt
This commit is contained in:
@@ -73,6 +73,7 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import static com.mogo.module.common.utils.SPConst.getSPGuideRecord;
|
||||
import static com.mogo.module.common.utils.SPConst.getSpGuide;
|
||||
import static com.mogo.module.share.constant.ShareConstants.KEY_CLICK_SHARE_BUTTON;
|
||||
import static com.mogo.module.share.constant.ShareConstants.KEY_CLICK_SHARE_TIME;
|
||||
@@ -359,8 +360,8 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
debugTopView();
|
||||
|
||||
boolean isShowGuide = SharedPrefsMgr.getInstance(AbsMogoApplication.getApp()).getBoolean(getSpGuide(), false);
|
||||
Logger.d(TAG, " isShowGuide = " + isShowGuide);
|
||||
if (isShowGuide) {
|
||||
Logger.d(TAG, " isShowGuide = " + isShowGuide + " --isGreaterThanOneDay = " + isGreaterThanOneDay());
|
||||
if (isShowGuide && isGreaterThanOneDay()) {
|
||||
UiThreadHandler.postDelayed(() -> {
|
||||
playShareOuterGuideVoice();
|
||||
}, 5_000L
|
||||
@@ -368,6 +369,20 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private boolean isGreaterThanOneDay() {
|
||||
boolean isGreaterThanOneDay;
|
||||
long guideRecordTime = SharedPrefsMgr.getInstance(AbsMogoApplication.getApp()).getLong(getSPGuideRecord(), 0);
|
||||
Logger.d(TAG, " isGreaterThanOneDay interval = " + (System.currentTimeMillis() - guideRecordTime));
|
||||
if ((System.currentTimeMillis() - guideRecordTime) > ONE_DAY_TIME) {
|
||||
isGreaterThanOneDay = true;
|
||||
} else {
|
||||
isGreaterThanOneDay = false;
|
||||
}
|
||||
|
||||
return isGreaterThanOneDay;
|
||||
}
|
||||
|
||||
Random random = new Random();
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user