pull/1112/head
gedoor 3 years ago
parent 8b8f362248
commit 4b3750519d
  1. 6
      app/src/main/java/io/legado/app/utils/EventBusExtensions.kt

@ -20,6 +20,10 @@ inline fun <reified EVENT> postEventDelay(tag: String, event: EVENT, delay: Long
LiveEventBus.get<Any>(tag).postDelay(event, delay)
}
inline fun <reified EVENT> postEventOrderly(tag: String, event: EVENT) {
LiveEventBus.get<Any>(tag).postOrderly(event)
}
inline fun <reified EVENT> AppCompatActivity.observeEvent(
vararg tags: String,
noinline observer: (EVENT) -> Unit
@ -32,7 +36,6 @@ inline fun <reified EVENT> AppCompatActivity.observeEvent(
}
}
inline fun <reified EVENT> AppCompatActivity.observeEventSticky(
vararg tags: String,
noinline observer: (EVENT) -> Unit
@ -68,4 +71,3 @@ inline fun <reified EVENT> Fragment.observeEventSticky(
eventObservable<EVENT>(it).observeSticky(this, o)
}
}

Loading…
Cancel
Save