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

TOP-67 fix 회원가입 이후 Splash 아이콘이 표시되었다가 메인으로 이동되는 현상 수정 #101

Merged
merged 3 commits into from
Oct 2, 2023
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
4 changes: 2 additions & 2 deletions app/src/main/java/com/tht/tht/SplashActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package com.tht.tht
import android.animation.Animator
import android.annotation.SuppressLint
import android.os.Bundle
import android.util.Log
import androidx.activity.result.contract.ActivityResultContracts
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import androidx.core.view.isVisible
import androidx.lifecycle.lifecycleScope
import com.tht.tht.databinding.ActivitySplashBinding
import dagger.hilt.android.AndroidEntryPoint
Expand Down Expand Up @@ -47,7 +47,7 @@ class SplashActivity : AppCompatActivity() {

private fun observeViewModel() {
val signupResult = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) {
Log.d("TAG", "signupResult => $it")
binding.lottieView.isVisible = false
when (it.resultCode) {
RESULT_OK -> viewModel.signupSuccessEvent()
else -> viewModel.signupCancelEvent()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package com.tht.tht.domain.topic

/**
* Topic 의 idx 값을 보내야 함(keywordIdx 가 아닌 그냥 idx)
*/
class SelectTopicUseCase(
private val repository: DailyTopicRepository
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class PreloginActivity : BaseStateActivity<PreloginViewModel, ActivityPreloginBi

override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)
Log.d("TAG", "onNewIntent PreloginActivity")
Log.d("TAG", "onNewIntent PreLoginActivity")
setResult(RESULT_OK)
finish()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ class ToHotViewModel @Inject constructor(

fun topicSelectFinishEvent() {
val selectTopicIdx = with(store.state.value) {
topicList.list.indexOfFirst { it.key == selectTopicKey }
}
topicList.list.find { it.key == selectTopicKey }
}?.idx ?: -1
if (selectTopicIdx < 0) return

intent {
Expand Down