| | |
| | | package com.future.driver.ui.mine.setting |
| | | |
| | | import android.view.View |
| | | import cn.sinata.xldutils.utils.Utils |
| | | import com.kuaiyun.emanagercar.ui.base.BaseWebActivity |
| | | import com.future.driver.R |
| | |
| | | import com.tencent.mm.opensdk.modelbase.BaseResp |
| | | import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler |
| | | import kotlinx.android.synthetic.main.activity_setting.* |
| | | import kotlinx.android.synthetic.main.dialog_sure_and_del.view.* |
| | | import org.greenrobot.eventbus.EventBus |
| | | import org.jetbrains.anko.toast |
| | | |
| | |
| | | DownloadUtil(this).downloadAPK(data.data.url, "未来出行司机端") |
| | | }) |
| | | } else if (data.data.mandatory == 1) { |
| | | DialogUtil.getDelAndSureDialog(this, "版本已过时,是否强制升级?", { |
| | | EventBus.getDefault().post(BaseEvent(BaseEvent.OUT_APP)) |
| | | var isOk = false |
| | | val delAndSureDialog = DialogUtil.getDelAndSureDialog(this, "版本已过时,是否强制升级?", { |
| | | }, { |
| | | isOk = true |
| | | DownloadUtil(this).downloadAPK(data.data.url, "未来出行司机端") |
| | | ToastUtils.showShortToast(this, "后台开始下载,请等待") |
| | | }) |
| | | val view = DialogUtil.getView(delAndSureDialog) |
| | | view.view_hint_close_base.visibility = View.INVISIBLE |
| | | delAndSureDialog.setOnDismissListener { |
| | | if (!isOk) |
| | | EventBus.getDefault().post(BaseEvent(BaseEvent.OUT_APP)) |
| | | } |
| | | }else{ |
| | | // toast("已经是最新版本") |
| | | } |