Skip to content

Commit 7127d6c

Browse files
committed
♻️ 컨벤션에 맞춰 !! -> requireNotNull로 변경
1 parent f0a50cc commit 7127d6c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

presentation/src/main/java/com/whyranoid/presentation/community/group/detail/GroupDetailViewModel.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ class GroupDetailViewModel @Inject constructor(
2929
stateHandle: SavedStateHandle
3030
) : ViewModel() {
3131

32-
private val groupId = stateHandle.get<GroupInfoUiModel>("groupInfo")?.groupId ?: ""
33-
34-
// TODO : 데이터 스토어에 저장된 Uid와 비교해야함.
35-
val isLeader =
36-
stateHandle.get<GroupInfoUiModel>("groupInfo")?.leader?.name == "soopeach"
32+
private val groupId = requireNotNull(stateHandle.get<GroupInfoUiModel>("groupInfo")).groupId
3733

3834
private var _groupInfo =
39-
MutableStateFlow<GroupInfoUiModel>(stateHandle.get<GroupInfoUiModel>("groupInfo")!!)
35+
MutableStateFlow(requireNotNull(stateHandle.get<GroupInfoUiModel>("groupInfo")))
4036
val groupInfo: StateFlow<GroupInfoUiModel>
4137
get() = _groupInfo.asStateFlow()
4238

39+
// TODO : 데이터 스토어에 저장된 Uid와 비교해야함.
40+
val isLeader =
41+
requireNotNull(stateHandle.get<GroupInfoUiModel>("groupInfo")).leader.name == "soopeach"
42+
4343
private val _eventFlow = MutableSharedFlow<Event>()
4444
val eventFlow: SharedFlow<Event>
4545
get() = _eventFlow.asSharedFlow()

0 commit comments

Comments
 (0)