mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 05:31:21 +03:00
cleaning
This commit is contained in:
parent
697b551b9b
commit
97daf57b0a
3 changed files with 12 additions and 12 deletions
|
@ -215,14 +215,14 @@ class HomeActivityViewModel @AssistedInject constructor(
|
|||
try {
|
||||
session.cryptoService().crossSigningService().initializeCrossSigning(
|
||||
object : UserInteractiveAuthInterceptor {
|
||||
override fun performStage(flow: RegistrationFlowResponse, errorCode: String?, promise: Continuation<UIABaseAuth>) {
|
||||
override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation<UIABaseAuth>) {
|
||||
// We missed server grace period or it's not setup, see if we remember locally password
|
||||
if (flow.nextUncompletedStage() == LoginFlowTypes.PASSWORD
|
||||
&& errorCode == null
|
||||
if (flowResponse.nextUncompletedStage() == LoginFlowTypes.PASSWORD
|
||||
&& errCode == null
|
||||
&& reAuthHelper.data != null) {
|
||||
promise.resume(
|
||||
UserPasswordAuth(
|
||||
session = flow.session,
|
||||
session = flowResponse.session,
|
||||
user = session.myUserId,
|
||||
password = reAuthHelper.data
|
||||
)
|
||||
|
|
|
@ -98,9 +98,9 @@ class CrossSigningSettingsViewModel @AssistedInject constructor(
|
|||
awaitCallback<Unit> {
|
||||
session.cryptoService().crossSigningService().initializeCrossSigning(
|
||||
object : UserInteractiveAuthInterceptor {
|
||||
override fun performStage(flow: RegistrationFlowResponse, errorCode: String?, promise: Continuation<UIABaseAuth>) {
|
||||
override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation<UIABaseAuth>) {
|
||||
Timber.d("## UIA : initializeCrossSigning UIA")
|
||||
if (flow.nextUncompletedStage() == LoginFlowTypes.PASSWORD && reAuthHelper.data != null && errorCode == null) {
|
||||
if (flowResponse.nextUncompletedStage() == LoginFlowTypes.PASSWORD && reAuthHelper.data != null && errCode == null) {
|
||||
UserPasswordAuth(
|
||||
session = null,
|
||||
user = session.myUserId,
|
||||
|
@ -108,8 +108,8 @@ class CrossSigningSettingsViewModel @AssistedInject constructor(
|
|||
).let { promise.resume(it) }
|
||||
} else {
|
||||
Timber.d("## UIA : initializeCrossSigning UIA > start reauth activity")
|
||||
_viewEvents.post(CrossSigningSettingsViewEvents.RequestReAuth(flow, errorCode))
|
||||
pendingAuth = DefaultBaseAuth(session = flow.session)
|
||||
_viewEvents.post(CrossSigningSettingsViewEvents.RequestReAuth(flowResponse, errCode))
|
||||
pendingAuth = DefaultBaseAuth(session = flowResponse.session)
|
||||
uiaContinuation = promise
|
||||
}
|
||||
}
|
||||
|
|
|
@ -334,9 +334,9 @@ class DevicesViewModel @AssistedInject constructor(
|
|||
try {
|
||||
awaitCallback<Unit> {
|
||||
session.cryptoService().deleteDevice(deviceId, object : UserInteractiveAuthInterceptor {
|
||||
override fun performStage(flow: RegistrationFlowResponse, errorCode: String?, promise: Continuation<UIABaseAuth>) {
|
||||
override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation<UIABaseAuth>) {
|
||||
Timber.d("## UIA : deleteDevice UIA")
|
||||
if (flow.nextUncompletedStage() == LoginFlowTypes.PASSWORD && reAuthHelper.data != null && errorCode == null) {
|
||||
if (flowResponse.nextUncompletedStage() == LoginFlowTypes.PASSWORD && reAuthHelper.data != null && errCode == null) {
|
||||
UserPasswordAuth(
|
||||
session = null,
|
||||
user = session.myUserId,
|
||||
|
@ -344,8 +344,8 @@ class DevicesViewModel @AssistedInject constructor(
|
|||
).let { promise.resume(it) }
|
||||
} else {
|
||||
Timber.d("## UIA : deleteDevice UIA > start reauth activity")
|
||||
_viewEvents.post(DevicesViewEvents.RequestReAuth(flow, errorCode))
|
||||
pendingAuth = DefaultBaseAuth(session = flow.session)
|
||||
_viewEvents.post(DevicesViewEvents.RequestReAuth(flowResponse, errCode))
|
||||
pendingAuth = DefaultBaseAuth(session = flowResponse.session)
|
||||
uiaContinuation = promise
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue