Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat/#118] main hard push 오류 방지 #140

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ fun MyPageScreen(

val frontCardState by myPageViewModel.frontCardState.collectAsState()
val userName by viewModel.userName.collectAsState()
val isFrontCardShown by myPageViewModel.isFrontCardShown.collectAsState()
val backCard by myPageViewModel.backCardState.collectAsState()

val density = LocalDensity.current.density
Expand All @@ -92,11 +91,6 @@ fun MyPageScreen(
)
}

val rotation by animateFloatAsState(
targetValue = if (isFrontCardShown) 0f else 180f,
animationSpec = tween(durationMillis = 500), label = ""
)

TmScaffold(
isSetting = true,
onClick = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,11 @@ class MyPageViewModel @Inject constructor(
private val _friendsList = MutableStateFlow<List<FriendMyPage>>(emptyList())
val friendsList : StateFlow<List<FriendMyPage>> = _friendsList

private val _isFrontCardShown = MutableStateFlow(true)
val isFrontCardShown: StateFlow<Boolean> = _isFrontCardShown

init {
loadUserInfo()
loadFriends()
}

fun toggleCardState() {
_isFrontCardShown.value = !_isFrontCardShown.value
}

fun loadFriends() {
val userId = authRepository.getUserId()
if (userId != -1L) {
Expand Down
Loading