Skip to content

Commit

Permalink
[FEAT/#121] 네트워크 관련 로직 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
leeeyubin committed Jul 17, 2024
1 parent 923a4ea commit a419e86
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 41 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ fun SplashScreen(
val context = LocalContext.current
val lifecycleOwner = LocalLifecycleOwner.current

var showDialog = remember { mutableStateOf(false) }

LaunchedEffect(key1 = true) {
viewModel.checkConnectedNetwork(context, lifecycleOwner)
}
Expand All @@ -55,23 +53,11 @@ fun SplashScreen(
}

is SplashState.AlertDialog -> {
showDialog.value = true
}
}
}
}

TerningImage(painter = R.drawable.ic_splash, modifier = Modifier.fillMaxSize())

if (showDialog.value) {
SplashDialog(
onDismissRequest = {
showDialog.value = false
},
content = {
Text(text = "인터넷 연결 확인 바람")

},
)
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.terning.feature.onboarding.splash

import androidx.appcompat.app.AlertDialog

sealed class SplashState {
data object AlertDialog : SplashState()
data class GetHasAccessToken(val hasAccessToken: Boolean) : SplashState()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ class SplashViewModel @Inject constructor(

fun checkConnectedNetwork(context: Context, lifecycleOwner: LifecycleOwner) {
viewModelScope.launch {
if (NetworkManager.checkNetworkState(context)) {
initSplash(lifecycleOwner)
} else {
_sideEffects.emit(SplashState.AlertDialog)
}
initSplash(lifecycleOwner)
}
}

Expand Down

0 comments on commit a419e86

Please sign in to comment.