fix event handling in TimelineFragment (#2143)

This commit is contained in:
Konrad Pozniak 2021-05-02 17:17:30 +02:00 committed by GitHub
parent 9594e79f41
commit bd670a01c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -381,7 +381,7 @@ class TimelineFragment : SFragment(), OnRefreshListener, StatusActionListener, I
if (!eventRegistered) {
eventHub.events
.observeOn(AndroidSchedulers.mainThread())
.autoDispose(from(this))
.autoDispose(from(this, Lifecycle.Event.ON_DESTROY))
.subscribe { event: Event? ->
when (event) {
is FavoriteEvent -> handleFavEvent(event)