Skip to content

Instantly share code, notes, and snippets.

@LouisCAD
Created August 9, 2018 15:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LouisCAD/4f21d67b5cf136e9fe8091758f0ff033 to your computer and use it in GitHub Desktop.
Save LouisCAD/4f21d67b5cf136e9fe8091758f0ff033 to your computer and use it in GitHub Desktop.
@Suppress("NOTHING_TO_INLINE")
inline operator fun <E> ConflatedBroadcastChannel<E>.getValue(
thisRef: Any?,
prop: KProperty<*>
): E = value
@Suppress("NOTHING_TO_INLINE")
inline operator fun <E> ConflatedBroadcastChannel<E>.setValue(
thisRef: Any?,
prop: KProperty<*>,
value: E
) {
offer(value)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment