Skip to content

Commit cd2d33f

Browse files
committed
resolve build error [FoKE-Developers#58]
1 parent 3f2c620 commit cd2d33f

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

domain/src/main/java/com/foke/together/domain/interactor/CaptureWithExternalCameraUseCase.kt

-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ import com.foke.together.util.TimeUtil
88
import dagger.hilt.android.qualifiers.ApplicationContext
99
import javax.inject.Inject
1010

11-
// TODO: CameraScreen에서 filepath를 TimeUtil.getCurrentTimeSec() 로 전달
12-
// filepath를 ScameraScreen -> GenerateScreen -> ShareScreen 로 전달
13-
// 추후에는 filepath를 presenter에서 관리하지 않도록 해야 할듯
1411
class CaptureWithExternalCameraUseCase @Inject constructor(
1512
@ApplicationContext private val context: Context,
1613
private val externalCameraRepository: ExternalCameraRepositoryInterface

presenter/src/main/java/com/foke/together/presenter/frame/FourCutFrame.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ fun FourCutFrame(
8383
tint = designColorScheme.primaryContainer
8484
)
8585
Text(
86-
text = TimeUtil.getCurrentTime(),
86+
text = TimeUtil.getCurrentDisplayTime(),
8787
modifier = Modifier.constrainAs(curTime){
8888
top.linkTo(decorateImage.bottom)
8989
start.linkTo(parent.start)

presenter/src/main/java/com/foke/together/presenter/frame/MakerFaireFrame.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ fun MakerFaireFrame(
8989
)
9090

9191
Text(
92-
text = TimeUtil.getCurrentTime(),
92+
text = TimeUtil.getCurrentDisplayTime(),
9393
modifier = Modifier.constrainAs(curTime){
9494
top.linkTo(decorateImage.bottom)
9595
bottom.linkTo(parent.bottom, margin = 15.dp)

presenter/src/main/java/com/foke/together/presenter/viewmodel/CameraViewModel.kt

+8-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import com.foke.together.domain.interactor.GetExternalCameraPreviewUrlUseCase
1111
import com.foke.together.util.AppPolicy
1212
import com.foke.together.util.AppPolicy.CAPTURE_INTERVAL
1313
import com.foke.together.util.AppPolicy.COUNTDOWN_INTERVAL
14+
import com.foke.together.util.TimeUtil
1415
import dagger.hilt.android.lifecycle.HiltViewModel
1516
import kotlinx.coroutines.delay
1617
import kotlinx.coroutines.launch
@@ -30,14 +31,20 @@ class CameraViewModel @Inject constructor(
3031
val captureCount: Int by _captureCount
3132
private var captureTimer: CountDownTimer? = null
3233
private var mTimerState = false
34+
35+
// TODO: CameraScreen에서 filepath를 TimeUtil.getCurrentTimeSec() 로 전달
36+
// filepath를 ScameraScreen -> GenerateScreen -> ShareScreen 로 전달
37+
// 추후에는 filepath를 presenter에서 관리하지 않도록 해야 할듯
38+
val filepath = TimeUtil.getCurrentTimeSec()
39+
3340
fun setCaptureTimer(nextNavigate: () -> Unit) {
3441
captureTimer = object : CountDownTimer(CAPTURE_INTERVAL, COUNTDOWN_INTERVAL) {
3542
override fun onTick(millisUntilFinished: Long) {
3643
_progressState.floatValue = 1f - (millisUntilFinished.toFloat() / CAPTURE_INTERVAL)
3744
}
3845
override fun onFinish() {
3946
viewModelScope.launch {
40-
captureWithExternalCameraUseCase()
47+
captureWithExternalCameraUseCase(filepath)
4148
_progressState.floatValue = 1f
4249
if (_captureCount.intValue < AppPolicy.CAPTURE_COUNT) {
4350
_captureCount.intValue += 1

0 commit comments

Comments
 (0)