Restore .observeOn(AndroidSchedulers.mainThread())

This commit is contained in:
Benoit Marty 2020-06-02 14:23:40 +02:00
parent 3fea2173f4
commit e2e1925796
6 changed files with 12 additions and 0 deletions

View file

@ -28,6 +28,7 @@ import im.vector.matrix.android.api.extensions.tryThis
import im.vector.riotx.R import im.vector.riotx.R
import im.vector.riotx.core.platform.VectorBaseFragment import im.vector.riotx.core.platform.VectorBaseFragment
import im.vector.riotx.core.utils.startImportTextFromFileIntent import im.vector.riotx.core.utils.startImportTextFromFileIntent
import io.reactivex.android.schedulers.AndroidSchedulers
import kotlinx.android.synthetic.main.fragment_ssss_access_from_key.* import kotlinx.android.synthetic.main.fragment_ssss_access_from_key.*
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
import javax.inject.Inject import javax.inject.Inject
@ -44,6 +45,7 @@ class SharedSecuredStorageKeyFragment @Inject constructor() : VectorBaseFragment
ssss_key_enter_edittext.editorActionEvents() ssss_key_enter_edittext.editorActionEvents()
.throttleFirst(300, TimeUnit.MILLISECONDS) .throttleFirst(300, TimeUnit.MILLISECONDS)
.observeOn(AndroidSchedulers.mainThread())
.subscribe { .subscribe {
if (it.actionId == EditorInfo.IME_ACTION_DONE) { if (it.actionId == EditorInfo.IME_ACTION_DONE) {
submit() submit()

View file

@ -29,6 +29,7 @@ import im.vector.riotx.core.extensions.showPassword
import im.vector.riotx.core.platform.VectorBaseFragment import im.vector.riotx.core.platform.VectorBaseFragment
import im.vector.riotx.core.resources.ColorProvider import im.vector.riotx.core.resources.ColorProvider
import im.vector.riotx.core.utils.colorizeMatchingText import im.vector.riotx.core.utils.colorizeMatchingText
import io.reactivex.android.schedulers.AndroidSchedulers
import kotlinx.android.synthetic.main.fragment_ssss_access_from_passphrase.* import kotlinx.android.synthetic.main.fragment_ssss_access_from_passphrase.*
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
import javax.inject.Inject import javax.inject.Inject
@ -58,6 +59,7 @@ class SharedSecuredStoragePassphraseFragment @Inject constructor(
ssss_passphrase_enter_edittext.editorActionEvents() ssss_passphrase_enter_edittext.editorActionEvents()
.throttleFirst(300, TimeUnit.MILLISECONDS) .throttleFirst(300, TimeUnit.MILLISECONDS)
.observeOn(AndroidSchedulers.mainThread())
.subscribe { .subscribe {
if (it.actionId == EditorInfo.IME_ACTION_DONE) { if (it.actionId == EditorInfo.IME_ACTION_DONE) {
submit() submit()

View file

@ -30,6 +30,7 @@ import im.vector.riotx.core.extensions.showPassword
import im.vector.riotx.core.platform.VectorBaseFragment import im.vector.riotx.core.platform.VectorBaseFragment
import im.vector.riotx.core.resources.ColorProvider import im.vector.riotx.core.resources.ColorProvider
import im.vector.riotx.core.utils.colorizeMatchingText import im.vector.riotx.core.utils.colorizeMatchingText
import io.reactivex.android.schedulers.AndroidSchedulers
import kotlinx.android.synthetic.main.fragment_bootstrap_enter_account_password.* import kotlinx.android.synthetic.main.fragment_bootstrap_enter_account_password.*
import kotlinx.android.synthetic.main.fragment_bootstrap_enter_passphrase.bootstrapDescriptionText import kotlinx.android.synthetic.main.fragment_bootstrap_enter_passphrase.bootstrapDescriptionText
import kotlinx.android.synthetic.main.fragment_bootstrap_enter_passphrase.ssss_view_show_password import kotlinx.android.synthetic.main.fragment_bootstrap_enter_passphrase.ssss_view_show_password
@ -56,6 +57,7 @@ class BootstrapAccountPasswordFragment @Inject constructor(
bootstrapAccountPasswordEditText.editorActionEvents() bootstrapAccountPasswordEditText.editorActionEvents()
.throttleFirst(300, TimeUnit.MILLISECONDS) .throttleFirst(300, TimeUnit.MILLISECONDS)
.observeOn(AndroidSchedulers.mainThread())
.subscribe { .subscribe {
if (it.actionId == EditorInfo.IME_ACTION_DONE) { if (it.actionId == EditorInfo.IME_ACTION_DONE) {
submit() submit()

View file

@ -31,6 +31,7 @@ import im.vector.riotx.core.extensions.showPassword
import im.vector.riotx.core.platform.VectorBaseFragment import im.vector.riotx.core.platform.VectorBaseFragment
import im.vector.riotx.core.resources.ColorProvider import im.vector.riotx.core.resources.ColorProvider
import im.vector.riotx.core.utils.colorizeMatchingText import im.vector.riotx.core.utils.colorizeMatchingText
import io.reactivex.android.schedulers.AndroidSchedulers
import kotlinx.android.synthetic.main.fragment_bootstrap_enter_passphrase.* import kotlinx.android.synthetic.main.fragment_bootstrap_enter_passphrase.*
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
import javax.inject.Inject import javax.inject.Inject
@ -63,6 +64,7 @@ class BootstrapConfirmPassphraseFragment @Inject constructor(
ssss_passphrase_enter_edittext.editorActionEvents() ssss_passphrase_enter_edittext.editorActionEvents()
.throttleFirst(300, TimeUnit.MILLISECONDS) .throttleFirst(300, TimeUnit.MILLISECONDS)
.observeOn(AndroidSchedulers.mainThread())
.subscribe { .subscribe {
if (it.actionId == EditorInfo.IME_ACTION_DONE) { if (it.actionId == EditorInfo.IME_ACTION_DONE) {
submit() submit()

View file

@ -30,6 +30,7 @@ import im.vector.riotx.core.platform.VectorBaseFragment
import im.vector.riotx.core.resources.ColorProvider import im.vector.riotx.core.resources.ColorProvider
import im.vector.riotx.core.utils.colorizeMatchingText import im.vector.riotx.core.utils.colorizeMatchingText
import im.vector.riotx.features.settings.VectorLocale import im.vector.riotx.features.settings.VectorLocale
import io.reactivex.android.schedulers.AndroidSchedulers
import kotlinx.android.synthetic.main.fragment_bootstrap_enter_passphrase.* import kotlinx.android.synthetic.main.fragment_bootstrap_enter_passphrase.*
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
import javax.inject.Inject import javax.inject.Inject
@ -57,6 +58,7 @@ class BootstrapEnterPassphraseFragment @Inject constructor(
} }
ssss_passphrase_enter_edittext.editorActionEvents() ssss_passphrase_enter_edittext.editorActionEvents()
.throttleFirst(300, TimeUnit.MILLISECONDS) .throttleFirst(300, TimeUnit.MILLISECONDS)
.observeOn(AndroidSchedulers.mainThread())
.subscribe { .subscribe {
if (it.actionId == EditorInfo.IME_ACTION_DONE) { if (it.actionId == EditorInfo.IME_ACTION_DONE) {
submit() submit()

View file

@ -39,6 +39,7 @@ import im.vector.riotx.core.platform.VectorBaseFragment
import im.vector.riotx.core.resources.ColorProvider import im.vector.riotx.core.resources.ColorProvider
import im.vector.riotx.core.utils.colorizeMatchingText import im.vector.riotx.core.utils.colorizeMatchingText
import im.vector.riotx.core.utils.startImportTextFromFileIntent import im.vector.riotx.core.utils.startImportTextFromFileIntent
import io.reactivex.android.schedulers.AndroidSchedulers
import kotlinx.android.synthetic.main.fragment_bootstrap_enter_passphrase.bootstrapDescriptionText import kotlinx.android.synthetic.main.fragment_bootstrap_enter_passphrase.bootstrapDescriptionText
import kotlinx.android.synthetic.main.fragment_bootstrap_migrate_backup.* import kotlinx.android.synthetic.main.fragment_bootstrap_migrate_backup.*
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
@ -61,6 +62,7 @@ class BootstrapMigrateBackupFragment @Inject constructor(
} }
bootstrapMigrateEditText.editorActionEvents() bootstrapMigrateEditText.editorActionEvents()
.throttleFirst(300, TimeUnit.MILLISECONDS) .throttleFirst(300, TimeUnit.MILLISECONDS)
.observeOn(AndroidSchedulers.mainThread())
.subscribe { .subscribe {
if (it.actionId == EditorInfo.IME_ACTION_DONE) { if (it.actionId == EditorInfo.IME_ACTION_DONE) {
submit() submit()