mirror of
https://github.com/InsanusMokrassar/SauceNaoAPI.git
synced 2024-12-23 13:17:11 +00:00
fix deprecations
This commit is contained in:
parent
c800a81a41
commit
0ed1a8702b
@ -158,7 +158,7 @@ data class SauceNaoAPI(
|
|||||||
minSimilarity: Float? = null
|
minSimilarity: Float? = null
|
||||||
): SauceNaoAnswer? {
|
): SauceNaoAnswer? {
|
||||||
return suspendCoroutine<SauceNaoAnswer> {
|
return suspendCoroutine<SauceNaoAnswer> {
|
||||||
requestsChannel.offer(
|
requestsChannel.trySend(
|
||||||
it to HttpRequestBuilder().apply {
|
it to HttpRequestBuilder().apply {
|
||||||
url(searchUrl)
|
url(searchUrl)
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ internal class RequestQuotaManager (
|
|||||||
quotaActions.send(callback)
|
quotaActions.send(callback)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
quotaActions.offer(callback)
|
quotaActions.trySend(callback)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ internal class TimeManager(
|
|||||||
|
|
||||||
suspend fun getMostOldestInLongPeriod(): DateTime? {
|
suspend fun getMostOldestInLongPeriod(): DateTime? {
|
||||||
return suspendCoroutine {
|
return suspendCoroutine {
|
||||||
actionsChannel.offer(
|
actionsChannel.trySend(
|
||||||
TimeManagerMostOldestInLongGetter(it)
|
TimeManagerMostOldestInLongGetter(it)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -92,7 +92,7 @@ internal class TimeManager(
|
|||||||
|
|
||||||
suspend fun getMostOldestInShortPeriod(): DateTime? {
|
suspend fun getMostOldestInShortPeriod(): DateTime? {
|
||||||
return suspendCoroutine {
|
return suspendCoroutine {
|
||||||
actionsChannel.offer(TimeManagerMostOldestInShortGetter(it))
|
actionsChannel.trySend(TimeManagerMostOldestInShortGetter(it))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user