File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
presentation/src/main/java/com/whyranoid/presentation/community Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,6 @@ internal class CommunityItemFragment :
21
21
22
22
private val viewModel: CommunityViewModel by viewModels()
23
23
24
- init {
25
- observe()
26
- }
27
-
28
24
private val category by lazy {
29
25
if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .TIRAMISU ) {
30
26
arguments?.getSerializable(COMMUNITY_CATEGORY_KEY , CommunityCategory ::class .java)
@@ -38,6 +34,8 @@ internal class CommunityItemFragment :
38
34
override fun onViewCreated (view : View , savedInstanceState : Bundle ? ) {
39
35
super .onViewCreated(view, savedInstanceState)
40
36
37
+ observeState()
38
+
41
39
// TODO : 카테고리 별 다른 Shimmer Layout 생성
42
40
when (category) {
43
41
CommunityCategory .BOARD -> {
@@ -52,7 +50,7 @@ internal class CommunityItemFragment :
52
50
}
53
51
}
54
52
55
- private fun observe () {
53
+ private fun observeState () {
56
54
repeatWhenUiStarted {
57
55
viewModel.eventFlow.collect { event ->
58
56
handleEvent(event)
You can’t perform that action at this time.
0 commit comments