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