Skip to content

Commit 010b719

Browse files
Fix docstring issues
1 parent 8866a95 commit 010b719

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

app/src/main/java/org/schabi/newpipe/util/potoken/PoTokenWebView.kt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import androidx.annotation.MainThread
1010
import androidx.collection.ArrayMap
1111
import androidx.webkit.WebSettingsCompat
1212
import androidx.webkit.WebViewFeature
13-
import io.reactivex.rxjava3.core.SingleEmitter
1413
import kotlinx.coroutines.CoroutineExceptionHandler
1514
import kotlinx.coroutines.Dispatchers
1615
import kotlinx.coroutines.MainScope
@@ -68,7 +67,7 @@ class PoTokenWebView private constructor(
6867
Log.e(TAG, "This WebView implementation is broken: $fmt")
6968

7069
onInitializationErrorCloseAndCancel(exception)
71-
popAllPoTokenContinuations().forEach { (_, emitter) -> emitter.resumeWithException(exception) }
70+
popAllPoTokenContinuations().forEach { (_, cont) -> cont.resumeWithException(exception) }
7271
}
7372
return super.onConsoleMessage(m)
7473
}
@@ -236,16 +235,16 @@ class PoTokenWebView private constructor(
236235
/**
237236
* Adds the ([identifier], [continuation]) pair to the [poTokenContinuations] list. This makes
238237
* it so that multiple poToken requests can be generated in parallel, and the results will be
239-
* notified to the right emitters.
238+
* notified to the right continuations.
240239
*/
241240
private fun addPoTokenEmitter(identifier: String, continuation: Continuation<String>) {
242241
poTokenContinuations[identifier] = continuation
243242
}
244243

245244
/**
246-
* Extracts and removes from the [poTokenContinuations] list a [SingleEmitter] based on its
247-
* [identifier]. The emitter is supposed to be used immediately after to either signal a success
248-
* or an error.
245+
* Extracts and removes from the [poTokenContinuations] list a [Continuation] based on its
246+
* [identifier]. The continuation is supposed to be used immediately after to either signal a
247+
* success or an error.
249248
*/
250249
private fun popPoTokenContinuation(identifier: String): Continuation<String>? {
251250
return poTokenContinuations.remove(identifier)

0 commit comments

Comments
 (0)