mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-02-09 07:30:06 +00:00
6c3f31a721
This sets up a little JavaFlow wrapper so we can register callbacks on the back press flow in Java-land. Inspired by one of the answers in https://stackoverflow.com/questions/60605176/kotlin-flows-java-interop-callback Kotlin generates default interface instances, but only if `-Xjvm-default=all` is set in the compiler flags. The Java IDE would propose using a lambda, which would fail because the kotlin compiler would not generate the right ABI without that flag.