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