mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-17 11:24:56 -04:00
JavaFXDelegate: don't instantly fire
This fixes a crash when connecting to servers
This commit is contained in:
parent
94571f207f
commit
bf33b342aa
@ -38,7 +38,6 @@ class ConnectingDialog(
|
||||
JavaFXUtil.openModalAsync(TITLE, LAYOUT, this) { update(connection.state) }
|
||||
}
|
||||
|
||||
|
||||
override fun init() {
|
||||
headerFX.text = HEADER
|
||||
cancelButtonFX.isDisable = true
|
||||
|
@ -35,31 +35,31 @@ object JavaFXDelegate {
|
||||
}
|
||||
|
||||
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||
fun <V> KProperty0<V>.observeFX(owner: Any, instant: Boolean = true, observer: (V) -> Unit) {
|
||||
fun <V> KProperty0<V>.observeFX(owner: Any, instant: Boolean = false, observer: (V) -> Unit) {
|
||||
checkErosState()
|
||||
this.observe(owner, instant) { JavaFXUtil.runLater { observer(it) } }
|
||||
}
|
||||
|
||||
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||
fun <V> KProperty0<Set<V>>.observeSetFX(owner: Any, instant: Boolean = true, observer: (SetChange<V>) -> Unit) {
|
||||
fun <V> KProperty0<Set<V>>.observeSetFX(owner: Any, instant: Boolean = false, observer: (SetChange<V>) -> Unit) {
|
||||
checkErosState()
|
||||
this.observeSet(owner, instant) { JavaFXUtil.runLater { observer(it) } }
|
||||
}
|
||||
|
||||
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||
fun <V> KProperty0<List<V>>.observeListFX(owner: Any, instant: Boolean = true, observer: (ListChange<V>) -> Unit) {
|
||||
fun <V> KProperty0<List<V>>.observeListFX(owner: Any, instant: Boolean = false, observer: (ListChange<V>) -> Unit) {
|
||||
checkErosState()
|
||||
this.observeList(owner, instant) { JavaFXUtil.runLater { observer(it) } }
|
||||
}
|
||||
|
||||
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||
fun <K, V> KProperty0<Map<K, V>>.observeMapFX(owner: Any, instant: Boolean = true, observer: (MapChange<K, V>) -> Unit) {
|
||||
fun <K, V> KProperty0<Map<K, V>>.observeMapFX(owner: Any, instant: Boolean = false, observer: (MapChange<K, V>) -> Unit) {
|
||||
checkErosState()
|
||||
this.observeMap(owner, instant) { JavaFXUtil.runLater { observer(it) } }
|
||||
}
|
||||
|
||||
@Suppress("NON_PUBLIC_CALL_FROM_PUBLIC_INLINE")
|
||||
fun <K, V> KProperty0<AbstractBiMap<K, V>>.observeBiMapFX(owner: Any, instant: Boolean = true, observer: (MapChange<K, V>) -> Unit) {
|
||||
fun <K, V> KProperty0<AbstractBiMap<K, V>>.observeBiMapFX(owner: Any, instant: Boolean = false, observer: (MapChange<K, V>) -> Unit) {
|
||||
checkErosState()
|
||||
this.observeBiMap(owner, instant) { JavaFXUtil.runLater { observer(it) } }
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user