Skip to content

Commit

Permalink
[FEATURE]#223 : 로딩 애니메이션 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongjaino committed Jan 26, 2025
1 parent 01309b7 commit 20abdaf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ import com.bff.wespot.entire.state.EntireAction
import com.bff.wespot.entire.state.EntireSideEffect
import com.bff.wespot.entire.viewmodel.EntireViewModel
import com.bff.wespot.navigation.Navigator
import com.bff.wespot.ui.component.LoadingAnimation
import com.ramcosta.composedestinations.annotation.Destination
import org.orbitmvi.orbit.compose.collectAsState
import org.orbitmvi.orbit.compose.collectSideEffect

interface AccountSettingNavigator {
Expand All @@ -47,14 +49,14 @@ fun AccountSettingScreen(
var showDialog by remember { mutableStateOf(false) }

val action = viewModel::onAction
val state by viewModel.collectAsState()

viewModel.collectSideEffect {
when (it) {
is EntireSideEffect.NavigateToAuth -> {
val intent = activityNavigator.navigateToAuth(context)
context.startActivity(intent)
}
else -> {}
}
}

Expand Down Expand Up @@ -94,6 +96,10 @@ fun AccountSettingScreen(
onDismissRequest = { },
)
}

if (state.isLoading) {
LoadingAnimation()
}
}

@Composable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import com.bff.wespot.entire.viewmodel.EntireViewModel
import com.bff.wespot.navigation.Navigator
import com.bff.wespot.navigation.util.EXTRA_TOAST_MESSAGE
import com.bff.wespot.ui.component.BottomButtonLayout
import com.bff.wespot.ui.component.LoadingAnimation
import com.bff.wespot.ui.component.WSBottomSheet
import com.bff.wespot.ui.component.WSSelectionItem
import com.bff.wespot.ui.util.handleSideEffect
Expand Down Expand Up @@ -170,6 +171,10 @@ fun RevokeConfirmScreen(
onDismissRequest = { },
)
}

if (state.isLoading) {
LoadingAnimation()
}
}

@Composable
Expand Down

0 comments on commit 20abdaf

Please sign in to comment.