File tree Expand file tree Collapse file tree 6 files changed +27
-31
lines changed
app/src/main/java/com/umc/ttoklip/presentation Expand file tree Collapse file tree 6 files changed +27
-31
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ class LoginActivity : BaseActivity<ActivityLoginBinding>(R.layout.activity_login
3333 override fun initView () {
3434 loginActivity= this
3535
36- viewModel.initIsLogin()
3736 binding.loginNaverBtn.setOnClickListener {
3837 val oauthLoginCallback = object : OAuthLoginCallback {
3938 override fun onError (errorCode : Int , message : String ) {
@@ -115,7 +114,11 @@ class LoginActivity : BaseActivity<ActivityLoginBinding>(R.layout.activity_login
115114 }
116115
117116 override fun onBackPressed () {
118- // super.onBackPressed()
117+ super .onBackPressed()
118+ }
119+
120+ fun cancelLogin (){
121+ viewModel.initIsLogin()
119122 }
120123
121124 override fun initObserver () {
Original file line number Diff line number Diff line change @@ -11,13 +11,18 @@ import dagger.hilt.android.AndroidEntryPoint
1111
1212@AndroidEntryPoint
1313class SignupActivity :BaseActivity <ActivitySignupBinding >(R .layout.activity_signup) {
14+ private lateinit var navHostFragment: NavHostFragment
15+
1416 override fun initView () {
1517 signupActivity= this
1618
17- val navHostFragment = supportFragmentManager.findFragmentById(R .id.signup_frm)as NavHostFragment
19+ navHostFragment = supportFragmentManager.findFragmentById(R .id.signup_frm)as NavHostFragment
1820 var navController= navHostFragment.findNavController()
21+
1922 binding.signupBackIb.setOnClickListener {
20- if (! navController.popBackStack()){
23+ if (navHostFragment.childFragmentManager.backStackEntryCount== 0 ){
24+ val loginactivity= LoginActivity .loginActivity!!
25+ loginactivity.cancelLogin()
2126 finish()
2227 }else {
2328 navController.popBackStack()
@@ -30,6 +35,16 @@ class SignupActivity:BaseActivity<ActivitySignupBinding>(R.layout.activity_signu
3035 }
3136 }
3237
38+ override fun onBackPressed () {
39+ if (navHostFragment.childFragmentManager.backStackEntryCount== 0 ){
40+ val loginactivity= LoginActivity .loginActivity!!
41+ loginactivity.cancelLogin()
42+ finish()
43+ }else {
44+ super .onBackPressed()
45+ }
46+ }
47+
3348 fun termBack (){
3449 val navHostFragment = supportFragmentManager.findFragmentById(R .id.signup_frm)as NavHostFragment
3550 var navController= navHostFragment.findNavController()
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ class Signup5Fragment: BaseFragment<FragmentSignup5Binding>(R.layout.fragment_si
7171 startActivity(intent)
7272 }
7373 binding.signup5LocationDirectEt.setOnClickListener {
74- startActivity(Intent (activity, DirectLocationActivity ::class .java))
74+ // startActivity(Intent(activity, DirectLocationActivity::class.java))
7575 }
7676 binding.signup5NextBtn.setOnClickListener {
7777 startActivity(Intent (activity, MainActivity ::class .java))
Original file line number Diff line number Diff line change @@ -12,31 +12,9 @@ import retrofit2.Response
1212
1313class DirectLocationActivity :
1414 BaseActivity <ActivityDirectLocationBinding >(R .layout.activity_direct_location) {
15- // private val kakaoApi = DirectLocationRepositoryImpl
1615
1716 override fun initView () {
18- callKakaoSearch(" 서울시 관악구 조원로12길 28" )
19- }
2017
21- fun callKakaoSearch (address : String ) {
22- // val kakao = MutableLiveData<KakaoResponse.ResultSearchKeyword>()
23- // kakaoApi.getSearchKeyword(kakaoInfo.API_KEY, query = address)
24- // .enqueue(object : retrofit2.Callback<KakaoResponse.ResultSearchKeyword> {
25- // override fun onResponse(
26- // call: Call<KakaoResponse.ResultSearchKeyword>,
27- // response: Response<KakaoResponse.ResultSearchKeyword>
28- // ) {
29- // kakao.value = response.body()
30- // Log.i("KAKAO SEARCH", "${kakao.value!!.documents[0].address_name}")
31- // }
32- //
33- // override fun onFailure(
34- // call: Call<KakaoResponse.ResultSearchKeyword>,
35- // t: Throwable
36- // ) {
37- // t.printStackTrace()
38- // }
39- // })
4018 }
4119
4220 override fun initObserver () {
Original file line number Diff line number Diff line change 1+ package com.umc.ttoklip.presentation.signup.location
2+
3+ class DirectLocationViewModel {
4+ }
You can’t perform that action at this time.
0 commit comments