-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix MainScheduler timeout and interval types. Fix MainScheduler wrong…
…ly removes timeout and interval ids on first task execution.
- Loading branch information
Showing
4 changed files
with
24 additions
and
34 deletions.
There are no files selected for viewing
8 changes: 4 additions & 4 deletions
8
reaktive/src/jsCommonMain/kotlin/com/badoo/reaktive/scheduler/JsFunctions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
package com.badoo.reaktive.scheduler | ||
|
||
internal expect fun jsSetTimeout(task: () -> Unit, delayMillis: Int): Int | ||
internal expect fun jsSetTimeout(task: () -> Unit, delayMillis: Int): Any | ||
|
||
internal expect fun jsSetInterval(task: () -> Unit, delayMillis: Int): Int | ||
internal expect fun jsSetInterval(task: () -> Unit, delayMillis: Int): Any | ||
|
||
internal expect fun jsClearTimeout(id: Int) | ||
internal expect fun jsClearTimeout(id: Any) | ||
|
||
internal expect fun jsClearInterval(id: Int) | ||
internal expect fun jsClearInterval(id: Any) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
reaktive/src/wasmJsMain/kotlin/com/badoo/reaktive/scheduler/JsFunctions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
package com.badoo.reaktive.scheduler | ||
|
||
internal actual fun jsSetTimeout(task: () -> Unit, delayMillis: Int): Int = | ||
internal actual fun jsSetTimeout(task: () -> Unit, delayMillis: Int): Any = | ||
js("setTimeout(task, delayMillis)") | ||
|
||
internal actual fun jsSetInterval(task: () -> Unit, delayMillis: Int): Int = | ||
internal actual fun jsSetInterval(task: () -> Unit, delayMillis: Int): Any = | ||
js("setInterval(task, delayMillis)") | ||
|
||
internal actual fun jsClearTimeout(id: Int) { | ||
internal actual fun jsClearTimeout(id: Any) { | ||
js("clearTimeout(id)") | ||
} | ||
|
||
internal actual fun jsClearInterval(id: Int) { | ||
internal actual fun jsClearInterval(id: Any) { | ||
js("clearInterval(id)") | ||
} |