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 {
|
try {
|
||||||
session.cryptoService().crossSigningService().initializeCrossSigning(
|
session.cryptoService().crossSigningService().initializeCrossSigning(
|
||||||
object : UserInteractiveAuthInterceptor {
|
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
|
// We missed server grace period or it's not setup, see if we remember locally password
|
||||||
if (flow.nextUncompletedStage() == LoginFlowTypes.PASSWORD
|
if (flowResponse.nextUncompletedStage() == LoginFlowTypes.PASSWORD
|
||||||
&& errorCode == null
|
&& errCode == null
|
||||||
&& reAuthHelper.data != null) {
|
&& reAuthHelper.data != null) {
|
||||||
promise.resume(
|
promise.resume(
|
||||||
UserPasswordAuth(
|
UserPasswordAuth(
|
||||||
session = flow.session,
|
session = flowResponse.session,
|
||||||
user = session.myUserId,
|
user = session.myUserId,
|
||||||
password = reAuthHelper.data
|
password = reAuthHelper.data
|
||||||
)
|
)
|
||||||
|
|
|
@ -98,9 +98,9 @@ class CrossSigningSettingsViewModel @AssistedInject constructor(
|
||||||
awaitCallback<Unit> {
|
awaitCallback<Unit> {
|
||||||
session.cryptoService().crossSigningService().initializeCrossSigning(
|
session.cryptoService().crossSigningService().initializeCrossSigning(
|
||||||
object : UserInteractiveAuthInterceptor {
|
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")
|
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(
|
UserPasswordAuth(
|
||||||
session = null,
|
session = null,
|
||||||
user = session.myUserId,
|
user = session.myUserId,
|
||||||
|
@ -108,8 +108,8 @@ class CrossSigningSettingsViewModel @AssistedInject constructor(
|
||||||
).let { promise.resume(it) }
|
).let { promise.resume(it) }
|
||||||
} else {
|
} else {
|
||||||
Timber.d("## UIA : initializeCrossSigning UIA > start reauth activity")
|
Timber.d("## UIA : initializeCrossSigning UIA > start reauth activity")
|
||||||
_viewEvents.post(CrossSigningSettingsViewEvents.RequestReAuth(flow, errorCode))
|
_viewEvents.post(CrossSigningSettingsViewEvents.RequestReAuth(flowResponse, errCode))
|
||||||
pendingAuth = DefaultBaseAuth(session = flow.session)
|
pendingAuth = DefaultBaseAuth(session = flowResponse.session)
|
||||||
uiaContinuation = promise
|
uiaContinuation = promise
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -334,9 +334,9 @@ class DevicesViewModel @AssistedInject constructor(
|
||||||
try {
|
try {
|
||||||
awaitCallback<Unit> {
|
awaitCallback<Unit> {
|
||||||
session.cryptoService().deleteDevice(deviceId, object : UserInteractiveAuthInterceptor {
|
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")
|
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(
|
UserPasswordAuth(
|
||||||
session = null,
|
session = null,
|
||||||
user = session.myUserId,
|
user = session.myUserId,
|
||||||
|
@ -344,8 +344,8 @@ class DevicesViewModel @AssistedInject constructor(
|
||||||
).let { promise.resume(it) }
|
).let { promise.resume(it) }
|
||||||
} else {
|
} else {
|
||||||
Timber.d("## UIA : deleteDevice UIA > start reauth activity")
|
Timber.d("## UIA : deleteDevice UIA > start reauth activity")
|
||||||
_viewEvents.post(DevicesViewEvents.RequestReAuth(flow, errorCode))
|
_viewEvents.post(DevicesViewEvents.RequestReAuth(flowResponse, errCode))
|
||||||
pendingAuth = DefaultBaseAuth(session = flow.session)
|
pendingAuth = DefaultBaseAuth(session = flowResponse.session)
|
||||||
uiaContinuation = promise
|
uiaContinuation = promise
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue