Skip to content

Commit

Permalink
#6 mypage_fragment/설정 화면 : 5 회원 탈퇴 화면 (추가)
Browse files Browse the repository at this point in the history
 - 회원탈퇴 버튼 불필요한 코드 삭제
  • Loading branch information
likppi10 committed Aug 27, 2022
1 parent 7da9613 commit 1e1d950
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@ import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.databinding.DataBindingUtil
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.lifecycleScope
import androidx.lifecycle.repeatOnLifecycle
import com.ftw.hometerview.R
import com.ftw.hometerview.databinding.ActivityWithdrawalBinding
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.launch
import javax.inject.Inject

@AndroidEntryPoint
Expand All @@ -34,18 +30,9 @@ class WithdrawalActivity : AppCompatActivity() {
this,
R.layout.activity_withdrawal
).apply {
lifecycleOwner = this@WithdrawalActivity
viewModel = this@WithdrawalActivity.viewModel
}
observe()
}

private fun observe() {
lifecycleScope.launch {
repeatOnLifecycle(Lifecycle.State.STARTED) {
viewModel.withdrawalCheck.collect { showBanner ->
binding.withdrawalButton.isEnabled = showBanner
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
package com.ftw.hometerview.ui.withdrawal

import com.ftw.hometerview.BR
import com.ftw.hometerview.R
import com.ftw.hometerview.adapter.RecyclerItem
import com.ftw.hometerview.dispatcher.Dispatcher
import com.ftw.hometerview.ui.main.favorite.favoritelist.FavoriteBuildingItem
import com.ftw.hometerview.ui.main.favorite.favoritelist.FavoriteBuildingsViewModel
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.*

class WithdrawalViewModel(
Expand All @@ -18,6 +12,7 @@ class WithdrawalViewModel(
val withdrawalThirdCheck: MutableStateFlow<Boolean> = MutableStateFlow(false)
val withdrawalCheck: MutableStateFlow<Boolean> = MutableStateFlow(false)


fun onClickWithdrawalFirstCheck() {
withdrawalFirstCheck.value = !withdrawalFirstCheck.value
withdrawalCheck.value = withdrawalCheck()
Expand Down

0 comments on commit 1e1d950

Please sign in to comment.