Skip to content

Commit 6d95a75

Browse files
committed
✨ 확장함수를 사용하여 warning을 Suppress
1 parent 1d307ae commit 6d95a75

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

presentation/src/main/java/com/whyranoid/presentation/community/CommunityItemFragment.kt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.whyranoid.presentation.community
22

3-
import android.os.Build
43
import android.os.Bundle
54
import android.view.View
65
import androidx.core.view.isVisible
@@ -10,6 +9,7 @@ import androidx.navigation.fragment.findNavController
109
import com.whyranoid.presentation.R
1110
import com.whyranoid.presentation.base.BaseFragment
1211
import com.whyranoid.presentation.databinding.FragmentCommunityItemBinding
12+
import com.whyranoid.presentation.util.getSerializableData
1313
import com.whyranoid.presentation.util.repeatWhenUiStarted
1414
import dagger.hilt.android.AndroidEntryPoint
1515
import kotlinx.coroutines.launch
@@ -21,13 +21,7 @@ internal class CommunityItemFragment :
2121
private val viewModel: CommunityViewModel by activityViewModels()
2222

2323
private val category by lazy {
24-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
25-
arguments?.getSerializable(COMMUNITY_CATEGORY_KEY, CommunityCategory::class.java)
26-
?: CommunityCategory.BOARD
27-
} else {
28-
arguments?.getSerializable(COMMUNITY_CATEGORY_KEY) as? CommunityCategory
29-
?: CommunityCategory.BOARD
30-
}
24+
arguments?.getSerializableData(COMMUNITY_CATEGORY_KEY) ?: CommunityCategory.BOARD
3125
}
3226

3327
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {

0 commit comments

Comments
 (0)