Convert SvrValues to kotlin.

This commit is contained in:
Greyson Parrelli
2024-11-06 11:35:10 -05:00
parent 35b80be8c8
commit 16e36c94de
16 changed files with 276 additions and 302 deletions

View File

@@ -507,7 +507,7 @@ class ChangeNumberViewModel : ViewModel() {
val currentState = store.value
val code = currentState.enteredCode ?: throw IllegalStateException("Can't construct registration data without entered code!")
val e164: String = number.e164Number ?: throw IllegalStateException("Can't construct registration data without E164!")
val recoveryPassword = if (currentState.sessionId == null) SignalStore.svr.getRecoveryPassword() else null
val recoveryPassword = if (currentState.sessionId == null) SignalStore.svr.recoveryPassword else null
val fcmToken = RegistrationRepository.getFcmToken(context)
return RegistrationData(code, e164, password, RegistrationRepository.getRegistrationId(), RegistrationRepository.getProfileKey(e164), fcmToken, RegistrationRepository.getPniRegistrationId(), recoveryPassword)
}

View File

@@ -52,7 +52,7 @@ class InternalSvrPlaygroundViewModel : ViewModel() {
disposables += Single
.fromCallable {
_state.value.selected.toImplementation()
.setPin(_state.value.userPin, SignalStore.svr.getOrCreateMasterKey())
.setPin(_state.value.userPin, SignalStore.svr.masterKey)
.execute()
}
.subscribeOn(Schedulers.io())