From f3c0b195e52679aa4972c567ff6cf128a504c3fc Mon Sep 17 00:00:00 2001 From: b1urrrr Date: Sat, 22 Jul 2023 03:37:07 +0900 Subject: [PATCH] =?UTF-8?q?[FIX]=20=EC=95=A1=ED=8B=B0=EB=B9=84=ED=8B=B0=20?= =?UTF-8?q?=EB=B7=B0=EB=AA=A8=EB=8D=B8=EB=A1=9C=20=EC=A0=95=EC=A0=95=20?= =?UTF-8?q?=EB=B0=8F=20=EC=95=B1=20=EC=9D=B4=EB=A6=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yello/presentation/main/yello/YelloFragment.kt | 12 ++++++------ .../yello/presentation/main/yello/YelloViewModel.kt | 2 +- app/src/main/res/values/strings.xml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/el/yello/presentation/main/yello/YelloFragment.kt b/app/src/main/java/com/el/yello/presentation/main/yello/YelloFragment.kt index 714c20dbb..4eea18f73 100644 --- a/app/src/main/java/com/el/yello/presentation/main/yello/YelloFragment.kt +++ b/app/src/main/java/com/el/yello/presentation/main/yello/YelloFragment.kt @@ -5,11 +5,15 @@ import android.content.Intent import android.os.Bundle import android.view.View import androidx.fragment.app.Fragment +import androidx.fragment.app.activityViewModels import androidx.fragment.app.commit import androidx.fragment.app.replace -import androidx.fragment.app.viewModels import com.el.yello.R import com.el.yello.databinding.FragmentYelloBinding +import com.el.yello.presentation.main.yello.lock.YelloLockFragment +import com.el.yello.presentation.main.yello.start.YelloStartFragment +import com.el.yello.presentation.main.yello.wait.YelloWaitFragment +import com.el.yello.util.context.yelloSnackbar import com.example.domain.entity.type.YelloState.Lock import com.example.domain.entity.type.YelloState.Valid import com.example.domain.entity.type.YelloState.Wait @@ -19,15 +23,11 @@ import com.example.ui.view.UiState.Empty import com.example.ui.view.UiState.Failure import com.example.ui.view.UiState.Loading import com.example.ui.view.UiState.Success -import com.el.yello.presentation.main.yello.lock.YelloLockFragment -import com.el.yello.presentation.main.yello.start.YelloStartFragment -import com.el.yello.presentation.main.yello.wait.YelloWaitFragment -import com.el.yello.util.context.yelloSnackbar import dagger.hilt.android.AndroidEntryPoint @AndroidEntryPoint class YelloFragment : BindingFragment(R.layout.fragment_yello) { - val viewModel by viewModels() + val viewModel by activityViewModels() override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) diff --git a/app/src/main/java/com/el/yello/presentation/main/yello/YelloViewModel.kt b/app/src/main/java/com/el/yello/presentation/main/yello/YelloViewModel.kt index 0418088b2..9af91f12a 100644 --- a/app/src/main/java/com/el/yello/presentation/main/yello/YelloViewModel.kt +++ b/app/src/main/java/com/el/yello/presentation/main/yello/YelloViewModel.kt @@ -44,7 +44,7 @@ class YelloViewModel @Inject constructor( getVoteState() } - fun decreaseTime() { + private fun decreaseTime() { leftTime.value ?: return if (isDecreasing) return viewModelScope.launch { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6609695c7..ffb27fe3d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,5 +1,5 @@ - YELLO + YELL:O Hello blank fragment 오류가 발생하였습니다.