summaryrefslogtreecommitdiffhomepage
path: root/android/lib/common/src
diff options
context:
space:
mode:
Diffstat (limited to 'android/lib/common/src')
-rw-r--r--android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/Intermittent.kt1
1 files changed, 1 insertions, 0 deletions
diff --git a/android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/Intermittent.kt b/android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/Intermittent.kt
index 38b152b00a..448d96778f 100644
--- a/android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/Intermittent.kt
+++ b/android/lib/common/src/main/kotlin/net/mullvad/mullvadvpn/lib/common/util/Intermittent.kt
@@ -39,6 +39,7 @@ class Intermittent<T> {
// resume execution. This allows performing any extra initialization before the value is made
// available for usage.
fun registerListener(id: Any, listener: (T?) -> Unit) = notifier.subscribe(id, listener)
+
fun unregisterListener(id: Any) = notifier.unsubscribe(id)
suspend fun await(): T {