Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pururun committed Dec 12, 2024
1 parent ae191c8 commit be31028
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import androidx.lifecycle.Lifecycle
import androidx.lifecycle.lifecycleScope
import androidx.lifecycle.repeatOnLifecycle
import arrow.core.merge
import co.touchlab.kermit.Logger
import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.flow.callbackFlow
import kotlinx.coroutines.flow.filter
Expand Down Expand Up @@ -131,12 +132,13 @@ class MainActivity : ComponentActivity(), AndroidScopeComponent {
}

private fun handleIntent(intent: Intent) {
if (intent.action == KEY_REQUEST_VPN_PROFILE) {
handleRequestVpnProfileIntent()
} else {
apiEndpointFromIntentHolder.setApiEndpointOverride(
intent.getApiEndpointConfigurationExtras()
)
when (val action = intent.action) {
Intent.ACTION_MAIN ->
apiEndpointFromIntentHolder.setApiEndpointOverride(
intent.getApiEndpointConfigurationExtras()
)
KEY_REQUEST_VPN_PROFILE -> handleRequestVpnProfileIntent()
else -> Logger.w("Unhandled intent action: $action")
}
}

Expand Down

0 comments on commit be31028

Please sign in to comment.