fix CalledFromWrongThreadException in ComposeActivity (#1447)

This commit is contained in:
Konrad Pozniak 2019-08-10 21:11:45 +02:00 committed by GitHub
parent 5a70f28192
commit 1a6f8d5b24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -314,6 +314,7 @@ public final class ComposeActivity
activeAccount.getFullName())); activeAccount.getFullName()));
mastodonApi.getInstance() mastodonApi.getInstance()
.observeOn(AndroidSchedulers.mainThread())
.as(autoDisposable(from(this, Lifecycle.Event.ON_DESTROY))) .as(autoDisposable(from(this, Lifecycle.Event.ON_DESTROY)))
.subscribe(this::onFetchInstanceSuccess, this::onFetchInstanceFailure); .subscribe(this::onFetchInstanceSuccess, this::onFetchInstanceFailure);