-
Notifications
You must be signed in to change notification settings - Fork 971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
View.draws() never emits in API 25, does in API 28 #506
Comments
Hmm I mean this observable doesn't do much. It just attaches a draw
listener to the view tree observer and emits whenever a callback happens.
The test for it passes on API 25 and 28 as well.
…On Tue, Mar 19, 2019 at 4:03 PM Dave Parker ***@***.***> wrote:
Current testbed app works fine on Pixel 3 and emulator both running API
28, but I had a critical bug appear when I tried it on a hardware tablet.
Tablet was running API 25, so I spun up an equivalent emulator, and tracked
the bug down to the fact that my UI changes go through a delaySubscription
operator keyed to the .draws() of my custom view.
Between inserting doOnNext with logger methods into the stream going into
the delaySubscription and adding similar doOnSubscribes to the
state-stream coming in from the back end, it's clear that the `.draws()
stream is simply never emitting on API 25.
Everything in the following executes on API 28, but on API 25 only the
"setup in" and "Meta subscribed" logging extension functions are executed.
private fun setupInStreams() {
logger("setup in")
val delayStream =
qenPage.draws()
.doOnNext { iLogger("drawn", qenPage) }
.delay(5, TimeUnit.MILLISECONDS)
.doOnNext { iLogger("delayed", qenPage) }
cd.addAll(
vm.getTouchesOut()
.observeOn(AndroidSchedulers.mainThread())
.subscribe {
qenPage.drawSegment(it)
},
vm.getMetaOut()
.doOnSubscribe { logger("Meta pre-subscribed") }
.observeOn(AndroidSchedulers.mainThread())
.delaySubscription(delayStream)
.doOnSubscribe { logger("Meta subscribed") }
.subscribe {
iLogger("Main activity received", it)
when (it) {
is MetaState.ClearCurrentPage -> qenPage.clearPage()
is MetaState.SelectedPage -> qenPage.drawPage(it.content)
}.exhaustive
}
)
}
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#506>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEEEeC4EQfm8t-7gxbICyPyO7MUDBTIks5vYUKggaJpZM4b9AAL>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current testbed app works fine on Pixel 3 and emulator both running API 28, but I had a critical bug appear when I tried it on a hardware tablet. Tablet was running API 25, so I spun up an equivalent emulator, and tracked the bug down to the fact that my UI changes go through a
delaySubscription
operator keyed to the.draws()
of my custom view.Between inserting
doOnNext
with logger methods into the stream going into thedelaySubscription
and adding similardoOnSubscribe
s to the state-stream coming in from the back end, it's clear that the `.draws() stream is simply never emitting on API 25.Everything in the following executes on API 28, but on API 25 only the "setup in" and "Meta subscribed" logging extension functions are executed.
The text was updated successfully, but these errors were encountered: