提升app更新弹窗未最高等级
This commit is contained in:
parent
866a46a7cb
commit
40d344e245
@ -68,6 +68,7 @@ import com.google.gson.Gson;
|
|||||||
import com.gyf.cactus.Cactus;
|
import com.gyf.cactus.Cactus;
|
||||||
import com.hjq.xtoast.XToast;
|
import com.hjq.xtoast.XToast;
|
||||||
import com.lxj.xpopup.XPopup;
|
import com.lxj.xpopup.XPopup;
|
||||||
|
import com.lxj.xpopup.core.BasePopupView;
|
||||||
import com.lxj.xpopup.interfaces.OnConfirmListener;
|
import com.lxj.xpopup.interfaces.OnConfirmListener;
|
||||||
import com.arpa.hndahesudintocctmsdriver.R;
|
import com.arpa.hndahesudintocctmsdriver.R;
|
||||||
import com.arpa.hndahesudintocctmsdriver.report.ALProcess;
|
import com.arpa.hndahesudintocctmsdriver.report.ALProcess;
|
||||||
@ -101,6 +102,7 @@ import com.arpa.hndahesudintocctmsdriver.util.http.RequsetCodeConstants;
|
|||||||
import com.arpa.hndahesudintocctmsdriver.util.time.Timer;
|
import com.arpa.hndahesudintocctmsdriver.util.time.Timer;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseFragment;
|
import com.arpa.hndahesudintocctmsdriver.util.view.BaseFragment;
|
||||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView;
|
import com.arpa.hndahesudintocctmsdriver.util.view.BaseRecyclerView;
|
||||||
|
import com.lxj.xpopup.interfaces.SimpleCallback;
|
||||||
import com.permissionx.guolindev.PermissionX;
|
import com.permissionx.guolindev.PermissionX;
|
||||||
import com.youth.banner.Banner;
|
import com.youth.banner.Banner;
|
||||||
import com.youth.banner.BannerConfig;
|
import com.youth.banner.BannerConfig;
|
||||||
@ -151,6 +153,8 @@ public class HomeFragment extends BaseFragment {
|
|||||||
|
|
||||||
private XToast xToast;
|
private XToast xToast;
|
||||||
|
|
||||||
|
private boolean isUpAppShow = false;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void msgMethod(Message m) {
|
public void msgMethod(Message m) {
|
||||||
@ -239,6 +243,19 @@ public class HomeFragment extends BaseFragment {
|
|||||||
new XPopup.Builder(con)
|
new XPopup.Builder(con)
|
||||||
.dismissOnBackPressed(false)
|
.dismissOnBackPressed(false)
|
||||||
.dismissOnTouchOutside(false)
|
.dismissOnTouchOutside(false)
|
||||||
|
.setPopupCallback(new SimpleCallback() {
|
||||||
|
@Override
|
||||||
|
public void onShow(BasePopupView popupView) {
|
||||||
|
super.onShow(popupView);
|
||||||
|
isUpAppShow = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDismiss(BasePopupView popupView) {
|
||||||
|
super.onDismiss(popupView);
|
||||||
|
isUpAppShow = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
.asCustom(new UpAppAlert(con, uab.getData().getDownloadUrl(), uab.getData().getContent(), uab.getData().getVersion(), uab.getData().getForce()))
|
.asCustom(new UpAppAlert(con, uab.getData().getDownloadUrl(), uab.getData().getContent(), uab.getData().getVersion(), uab.getData().getForce()))
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
@ -258,6 +275,11 @@ public class HomeFragment extends BaseFragment {
|
|||||||
if (CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA) != null) {
|
if (CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA) != null) {
|
||||||
DriverAuthDataBean dad = gson.fromJson(CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA), DriverAuthDataBean.class);
|
DriverAuthDataBean dad = gson.fromJson(CacheGroup.cacheList.get(WoDeFragment.AUTH_DATA), DriverAuthDataBean.class);
|
||||||
if (dad.getCode() == 200) {
|
if (dad.getCode() == 200) {
|
||||||
|
if (isUpAppShow) {
|
||||||
|
CacheGroup.cacheList.remove(WoDeFragment.AUTH_DATA);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (dad.getData() == null) {
|
if (dad.getData() == null) {
|
||||||
new MessageUtils().showSimCenPop(con, "该司机缺少身份证,未认证无法接单。是否去添加!", "去添加", () -> {
|
new MessageUtils().showSimCenPop(con, "该司机缺少身份证,未认证无法接单。是否去添加!", "去添加", () -> {
|
||||||
Intent in = new Intent(con, CertificatesActivity.class);
|
Intent in = new Intent(con, CertificatesActivity.class);
|
||||||
|
Loading…
Reference in New Issue
Block a user