Skip to content

Commit

Permalink
[FIX] 액티비티 뷰모델로 정정 및 앱 이름 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
b1urrrr committed Jul 21, 2023
1 parent 98ab17a commit f3c0b19
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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<FragmentYelloBinding>(R.layout.fragment_yello) {
val viewModel by viewModels<YelloViewModel>()
val viewModel by activityViewModels<YelloViewModel>()

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class YelloViewModel @Inject constructor(
getVoteState()
}

fun decreaseTime() {
private fun decreaseTime() {
leftTime.value ?: return
if (isDecreasing) return
viewModelScope.launch {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<resources>
<string name="app_name">YELLO</string>
<string name="app_name">YELL:O</string>

<string name="hello_blank_fragment">Hello blank fragment</string>
<string name="msg_error">오류가 발생하였습니다.</string>
Expand Down

0 comments on commit f3c0b19

Please sign in to comment.