Skip to content

Commit

Permalink
Revert "resolve build error [FoKE-Developers#58]"
Browse files Browse the repository at this point in the history
This reverts commit bce1868.
  • Loading branch information
DokySp committed Oct 9, 2024
1 parent 972d361 commit a8f5a39
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import com.foke.together.util.TimeUtil
import dagger.hilt.android.qualifiers.ApplicationContext
import javax.inject.Inject

// TODO: CameraScreen에서 filepath를 TimeUtil.getCurrentTimeSec() 로 전달
// filepath를 ScameraScreen -> GenerateScreen -> ShareScreen 로 전달
// 추후에는 filepath를 presenter에서 관리하지 않도록 해야 할듯
class CaptureWithExternalCameraUseCase @Inject constructor(
@ApplicationContext private val context: Context,
private val externalCameraRepository: ExternalCameraRepositoryInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ fun FourCutFrame(
tint = designColorScheme.primaryContainer
)
Text(
text = TimeUtil.getCurrentDisplayTime(),
text = TimeUtil.getCurrentTime(),
modifier = Modifier.constrainAs(curTime){
top.linkTo(decorateImage.bottom)
start.linkTo(parent.start)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ fun MakerFaireFrame(
)

Text(
text = TimeUtil.getCurrentDisplayTime(),
text = TimeUtil.getCurrentTime(),
modifier = Modifier.constrainAs(curTime){
top.linkTo(decorateImage.bottom)
bottom.linkTo(parent.bottom, margin = 15.dp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import com.foke.together.domain.interactor.GetExternalCameraPreviewUrlUseCase
import com.foke.together.util.AppPolicy
import com.foke.together.util.AppPolicy.CAPTURE_INTERVAL
import com.foke.together.util.AppPolicy.COUNTDOWN_INTERVAL
import com.foke.together.util.TimeUtil
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
Expand All @@ -31,20 +30,14 @@ class CameraViewModel @Inject constructor(
val captureCount: Int by _captureCount
private var captureTimer: CountDownTimer? = null
private var mTimerState = false

// TODO: CameraScreen에서 filepath를 TimeUtil.getCurrentTimeSec() 로 전달
// filepath를 ScameraScreen -> GenerateScreen -> ShareScreen 로 전달
// 추후에는 filepath를 presenter에서 관리하지 않도록 해야 할듯
val filepath = TimeUtil.getCurrentTimeSec()

fun setCaptureTimer(nextNavigate: () -> Unit) {
captureTimer = object : CountDownTimer(CAPTURE_INTERVAL, COUNTDOWN_INTERVAL) {
override fun onTick(millisUntilFinished: Long) {
_progressState.floatValue = 1f - (millisUntilFinished.toFloat() / CAPTURE_INTERVAL)
}
override fun onFinish() {
viewModelScope.launch {
captureWithExternalCameraUseCase(filepath)
captureWithExternalCameraUseCase()
_progressState.floatValue = 1f
if (_captureCount.intValue < AppPolicy.CAPTURE_COUNT) {
_captureCount.intValue += 1
Expand Down

0 comments on commit a8f5a39

Please sign in to comment.