Skip to content

Commit 5b1a340

Browse files
bngshyonghanJusoopeachpeter-j0y
committed
🔧 dummy data 타입 명시
Co-authored-by: yonghanJu <[email protected]> Co-authored-by: soopeach <[email protected]> Co-authored-by: Seungmin-develop <[email protected]>
1 parent 43a1779 commit 5b1a340

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

presentation/src/main/java/com/whyranoid/presentation/community/runningpost/CreateRunningPostViewModel.kt

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package com.whyranoid.presentation.community.runningpost
33
import androidx.lifecycle.SavedStateHandle
44
import androidx.lifecycle.ViewModel
55
import androidx.lifecycle.viewModelScope
6-
import com.whyranoid.domain.model.RunningHistory
76
import com.whyranoid.domain.usecase.CreateRunningPostUseCase
87
import com.whyranoid.presentation.model.RunningHistoryUiModel
98
import dagger.hilt.android.lifecycle.HiltViewModel
@@ -18,7 +17,7 @@ import javax.inject.Inject
1817
@HiltViewModel
1918
class CreateRunningPostViewModel @Inject constructor(
2019
private val createRunningPostUseCase: CreateRunningPostUseCase,
21-
private val savedState: SavedStateHandle
20+
savedState: SavedStateHandle
2221
) : ViewModel() {
2322

2423
val selectedRunningHistory =
@@ -48,15 +47,4 @@ class CreateRunningPostViewModel @Inject constructor(
4847
companion object {
4948
private const val RUNNING_HISTORY_SAFE_ARGS_KEY = "selectedRunningHistory"
5049
}
51-
52-
fun RunningHistoryUiModel.toRunningHistory(): RunningHistory {
53-
return RunningHistory(
54-
historyId = historyId,
55-
startedAt = startedAt.toLong(),
56-
finishedAt = finishedAt.toLong(),
57-
totalRunningTime = totalRunningTime.toInt(),
58-
pace = pace.toDouble(),
59-
totalDistance = totalDistance.toDouble()
60-
)
61-
}
6250
}

presentation/src/main/java/com/whyranoid/presentation/community/runningpost/SelectRunningHistoryViewModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class SelectRunningHistoryViewModel @Inject constructor(private val getRunningHi
2727
get() = _runningHistoryListState.asStateFlow()
2828

2929
// TODO 인증글 작성 넘어가도록 하는 더미데이터 -> 인증글 작성 로직이 완료되면 삭제하겠습니다
30-
private val _selectedRunningHistory = MutableStateFlow<RunningHistoryUiModel?>(RunningHistoryUiModel("seungmin_history_id", "8995875", "2452", "24524", "134", "124", "23"))
30+
private val _selectedRunningHistory = MutableStateFlow<RunningHistoryUiModel?>(RunningHistoryUiModel("seungmin_history_id", 8995875L, 2452, 24524L, 134L, 124.0, 23.0))
3131
val selectedRunningHistory: StateFlow<RunningHistoryUiModel?>
3232
get() = _selectedRunningHistory.asStateFlow()
3333

0 commit comments

Comments
 (0)