diff --git a/app/src/main/java/io/legado/app/utils/EventBusExtensions.kt b/app/src/main/java/io/legado/app/utils/EventBusExtensions.kt index fb47cde54..a94e7d1aa 100644 --- a/app/src/main/java/io/legado/app/utils/EventBusExtensions.kt +++ b/app/src/main/java/io/legado/app/utils/EventBusExtensions.kt @@ -20,6 +20,10 @@ inline fun postEventDelay(tag: String, event: EVENT, delay: Long LiveEventBus.get(tag).postDelay(event, delay) } +inline fun postEventOrderly(tag: String, event: EVENT) { + LiveEventBus.get(tag).postOrderly(event) +} + inline fun AppCompatActivity.observeEvent( vararg tags: String, noinline observer: (EVENT) -> Unit @@ -32,7 +36,6 @@ inline fun AppCompatActivity.observeEvent( } } - inline fun AppCompatActivity.observeEventSticky( vararg tags: String, noinline observer: (EVENT) -> Unit @@ -67,5 +70,4 @@ inline fun Fragment.observeEventSticky( tags.forEach { eventObservable(it).observeSticky(this, o) } -} - +} \ No newline at end of file