File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
presentation/src/main/java/com/whyranoid/presentation/community Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change 1
1
package com.whyranoid.presentation.community
2
2
3
- import android.os.Build
4
3
import android.os.Bundle
5
4
import android.view.View
6
5
import androidx.core.view.isVisible
@@ -10,6 +9,7 @@ import androidx.navigation.fragment.findNavController
10
9
import com.whyranoid.presentation.R
11
10
import com.whyranoid.presentation.base.BaseFragment
12
11
import com.whyranoid.presentation.databinding.FragmentCommunityItemBinding
12
+ import com.whyranoid.presentation.util.getSerializableData
13
13
import com.whyranoid.presentation.util.repeatWhenUiStarted
14
14
import dagger.hilt.android.AndroidEntryPoint
15
15
import kotlinx.coroutines.launch
@@ -21,13 +21,7 @@ internal class CommunityItemFragment :
21
21
private val viewModel: CommunityViewModel by activityViewModels()
22
22
23
23
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
31
25
}
32
26
33
27
override fun onViewCreated (view : View , savedInstanceState : Bundle ? ) {
You can’t perform that action at this time.
0 commit comments