mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 20:48:43 +00:00
Fix network on main thread crash.
This commit is contained in:
@@ -304,6 +304,7 @@ public final class RegistrationViewModel extends BaseRegistrationViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return verifyAccountRepository.registerAccount(null, registrationData, null, null)
|
return verifyAccountRepository.registerAccount(null, registrationData, null, null)
|
||||||
|
.observeOn(Schedulers.io())
|
||||||
.onErrorReturn(ServiceResponse::forUnknownError)
|
.onErrorReturn(ServiceResponse::forUnknownError)
|
||||||
.map(VerifyResponseWithoutKbs::new)
|
.map(VerifyResponseWithoutKbs::new)
|
||||||
.flatMap(processor -> {
|
.flatMap(processor -> {
|
||||||
@@ -329,8 +330,7 @@ public final class RegistrationViewModel extends BaseRegistrationViewModel {
|
|||||||
} else {
|
} else {
|
||||||
return Single.just(processor);
|
return Single.just(processor);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
.observeOn(AndroidSchedulers.mainThread());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public @NonNull Single<Boolean> canEnterSkipSmsFlow() {
|
public @NonNull Single<Boolean> canEnterSkipSmsFlow() {
|
||||||
|
|||||||
Reference in New Issue
Block a user