bugfix :跳转到登录页清空返回栈
This commit is contained in:
parent
9f3ed8aaeb
commit
2c3e482b3e
|
|
@ -40,7 +40,7 @@ class BandPhoneActivity : BaseActivity() {
|
|||
super.onCreate(savedInstanceState)
|
||||
isBandPhone = intent.getBooleanExtra("isPhone", true);
|
||||
setContentView(R.layout.activity_band_phone)
|
||||
val viewModel = ViewModelProvider(this).get(BandPhoneAtyVM::class.java)
|
||||
val viewModel = ViewModelProvider(this)[BandPhoneAtyVM::class.java]
|
||||
etPhoneNumber = findViewById(R.id.et_phone_number)
|
||||
tvAccount = findViewById(R.id.tv_account)
|
||||
tvTitle = findViewById(R.id.tv_title)
|
||||
|
|
@ -148,7 +148,7 @@ class BandPhoneActivity : BaseActivity() {
|
|||
//百度埋点完成注册
|
||||
// BaiduAction.logAction(ActionType.REGISTER)
|
||||
val intent=Intent(CommonUtils.getApp(), LoginActivity::class.java)
|
||||
intent.putExtra(BZYConstants.EXTRA_Bind_Account,phoneNumber)
|
||||
intent.flags = Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
startActivity(intent)
|
||||
finish()
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ class ChangePwdActivity : BaseActivity() {
|
|||
MMKV.defaultMMKV().removeValueForKey(BZYConstants.MMKV_KEY_REMEMBER_PASSWORD)
|
||||
cleanProfile()
|
||||
val intent=Intent(CommonUtils.getApp(), LoginActivity::class.java)
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
intent.flags = Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
startActivity(intent)
|
||||
finish()
|
||||
}else{
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.yingmao.clash.act
|
|||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.text.TextUtils
|
||||
|
|
@ -22,6 +23,7 @@ import com.yingmao.clash.base.BaseNotTitleActivity
|
|||
import com.yingmao.clash.net.http.HttpReqType
|
||||
import com.yingmao.clash.net.http.HttpStatus
|
||||
import com.yingmao.clash.net.http.entity.SendSmsRsp
|
||||
import com.yingmao.clash.util.CommonUtils
|
||||
import com.yingmao.clash.view.PasswordTransformationMethodBigDot
|
||||
import com.yingmao.clash.view.RxToast
|
||||
import com.yingmao.clash.view.dialog.RxDialogShapeLoading
|
||||
|
|
@ -100,7 +102,10 @@ class ForGetPwdActivity : BaseActivity(),
|
|||
(httpStatus.rsp as SendSmsRsp).let { ssp ->
|
||||
if (ssp.code == "1000") {
|
||||
RxToast.success(resources.getString(R.string.ModifiedSuccessfully))
|
||||
this@ForGetPwdActivity.finish()
|
||||
val intent=Intent(CommonUtils.getApp(), LoginActivity::class.java)
|
||||
intent.flags = Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
startActivity(intent)
|
||||
finish()
|
||||
} else {
|
||||
RxToast.error(resources.getString(R.string.ModificationFailed) + ssp.message)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class MineInfoActivity: BaseActivity() {
|
|||
mainAtyVM.stopHeartBeat()
|
||||
cleanProfile()
|
||||
val intent=Intent(CommonUtils.getApp(), LoginActivity::class.java)
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
intent.flags = Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
startActivity(intent)
|
||||
finish()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -789,7 +789,9 @@ class NewMainActivity : BaseActivity() {
|
|||
stopUploadTimer()
|
||||
mainAtyVM.stopHeartBeat()
|
||||
cleanProfile()
|
||||
startActivity(Intent(CommonUtils.getApp(), LoginActivity::class.java))
|
||||
val intent=Intent(CommonUtils.getApp(), LoginActivity::class.java)
|
||||
intent.flags = Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
startActivity(intent)
|
||||
finish()
|
||||
}
|
||||
private fun cleanUserInfoToLogout() {
|
||||
|
|
|
|||
|
|
@ -746,7 +746,9 @@ class SettingActivity : BaseActivity() {
|
|||
}
|
||||
mainAtyVM.stopHeartBeat()
|
||||
cleanProfile()
|
||||
startActivity(Intent(CommonUtils.getApp(), LoginActivity::class.java))
|
||||
val intent=Intent(CommonUtils.getApp(), LoginActivity::class.java)
|
||||
intent.flags = Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
startActivity(intent)
|
||||
finish()
|
||||
}
|
||||
private fun cleanProfile() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue