From ba4862cfce6a7bfe9bcff0ff8187762f4b9e710e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20L=C3=B6nnhager?= Date: Fri, 22 Nov 2024 10:10:58 +0100 Subject: [PATCH] fixup: detekt lint --- .../talpid/util/ConnectivityManagerUtil.kt | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/android/lib/talpid/src/main/kotlin/net/mullvad/talpid/util/ConnectivityManagerUtil.kt b/android/lib/talpid/src/main/kotlin/net/mullvad/talpid/util/ConnectivityManagerUtil.kt index a98edd8b5756..daf155c6e8ef 100644 --- a/android/lib/talpid/src/main/kotlin/net/mullvad/talpid/util/ConnectivityManagerUtil.kt +++ b/android/lib/talpid/src/main/kotlin/net/mullvad/talpid/util/ConnectivityManagerUtil.kt @@ -11,26 +11,6 @@ import kotlinx.coroutines.channels.trySendBlocking import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.callbackFlow -sealed interface NetworkEvent { - data class Available(val network: Network) : NetworkEvent - - data object Unavailable : NetworkEvent - - data class LinkPropertiesChanged(val network: Network, val linkProperties: LinkProperties) : - NetworkEvent - - data class CapabilitiesChanged( - val network: Network, - val networkCapabilities: NetworkCapabilities, - ) : NetworkEvent - - data class BlockedStatusChanged(val network: Network, val blocked: Boolean) : NetworkEvent - - data class Losing(val network: Network, val maxMsToLive: Int) : NetworkEvent - - data class Lost(val network: Network) : NetworkEvent -} - fun ConnectivityManager.defaultNetworkFlow(): Flow = callbackFlow { val callback = @@ -130,3 +110,23 @@ fun ConnectivityManager.networkFlow(networkRequest: NetworkRequest): Flow