mirror of
https://github.com/Myzel394/Alibi.git
synced 2025-06-18 23:05:26 +02:00
feat: Don't show RecordingControl until recording ready
This commit is contained in:
parent
4f9f65d0b1
commit
df0bb35672
@ -140,31 +140,35 @@ fun VideoRecordingStatus(
|
||||
|
||||
Divider()
|
||||
|
||||
RecordingControl(
|
||||
isPaused = videoRecorder.isPaused,
|
||||
recordingTime = videoRecorder.recordingTime,
|
||||
onDelete = {
|
||||
scope.launch {
|
||||
runCatching {
|
||||
videoRecorder.stopRecording(context)
|
||||
if (!videoRecorder.isStartingRecording) {
|
||||
RecordingControl(
|
||||
isPaused = videoRecorder.isPaused,
|
||||
recordingTime = videoRecorder.recordingTime,
|
||||
onDelete = {
|
||||
scope.launch {
|
||||
runCatching {
|
||||
videoRecorder.stopRecording(context)
|
||||
}
|
||||
runCatching {
|
||||
videoRecorder.destroyService(context)
|
||||
}
|
||||
videoRecorder.batchesFolder!!.deleteRecordings()
|
||||
}
|
||||
runCatching {
|
||||
videoRecorder.destroyService(context)
|
||||
},
|
||||
onPauseResume = {
|
||||
if (videoRecorder.isPaused) {
|
||||
videoRecorder.resumeRecording()
|
||||
} else {
|
||||
videoRecorder.pauseRecording()
|
||||
}
|
||||
videoRecorder.batchesFolder!!.deleteRecordings()
|
||||
},
|
||||
onSave = {
|
||||
videoRecorder.onRecordingSave(false)
|
||||
}
|
||||
},
|
||||
onPauseResume = {
|
||||
if (videoRecorder.isPaused) {
|
||||
videoRecorder.resumeRecording()
|
||||
} else {
|
||||
videoRecorder.pauseRecording()
|
||||
}
|
||||
},
|
||||
onSave = {
|
||||
videoRecorder.onRecordingSave(false)
|
||||
}
|
||||
)
|
||||
)
|
||||
} else {
|
||||
Box {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -8,7 +8,6 @@ import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableIntStateOf
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.setValue
|
||||
import app.myzel394.alibi.db.AppSettings
|
||||
import app.myzel394.alibi.db.RecordingInformation
|
||||
import app.myzel394.alibi.enums.RecorderState
|
||||
import app.myzel394.alibi.helpers.VideoBatchesFolder
|
||||
|
Loading…
x
Reference in New Issue
Block a user