Skip to content

Commit f7126ac

Browse files
lsakeeSangwook123
authored andcommitted
[feat] #62 success back stack
1 parent d886142 commit f7126ac

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ charset = utf-8
55
end_of_line = lf
66
indent_size = 4
77
indent_style = space
8-
max_line_length = 150
8+
max_line_length = 350
99
insert_final_newline = true
1010
trim_trailing_whitespace = true
1111

feature/upload/src/main/java/com/record/upload/UploadViewModel.kt

+3-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ class UploadViewModel @Inject constructor(
8080
videoUrl = a,
8181
previewUrl = b,
8282
),
83-
)
83+
).onSuccess {
84+
popBackStack()
85+
}
8486
}
8587

8688
private fun encodingString(contentValue: String): String {

feature/upload/src/main/java/com/record/upload/VideoPickerScreen.kt

+10-5
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,7 @@ fun VideoPickerScreen(
200200
modifier = Modifier
201201
.padding(horizontal = 16.dp),
202202
) {
203-
if (state.video != null) {
204-
uploadVideoS3Bucket(File(state.video.filepath))
205-
// compressVideo(context, state.video.uri,state.video.name, onSuccess = onSuccess)
206-
}
203+
207204
Text(
208205
text = "영상",
209206
color = RecordyTheme.colors.white,
@@ -353,10 +350,16 @@ fun VideoPickerScreen(
353350
RecordyButton(
354351
text = "키워드",
355352
enabled = false,
356-
onClick = { Timber.d("basic key word") },
353+
onClick = {
354+
if (state.video != null) {
355+
uploadVideoS3Bucket(File(state.video.filepath))
356+
// compressVideo(context, state.video.uri,state.video.name, onSuccess = onSuccess)
357+
}
358+
},
357359
)
358360
}
359361
}
362+
360363
if (state.showShouldShowRationaleDialog) {
361364
RecordyDialog(
362365
graphicAsset = R.drawable.img_allow,
@@ -370,6 +373,7 @@ fun VideoPickerScreen(
370373
},
371374
)
372375
}
376+
373377
if (state.showExitUploadDialog) {
374378
RecordyDialog(
375379
graphicAsset = R.drawable.img_allow,
@@ -381,6 +385,7 @@ fun VideoPickerScreen(
381385
onPositiveButtonClick = onClickBackStack,
382386
)
383387
}
388+
384389
SelectedVideoBottomSheet(
385390
sheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true),
386391
isSheetOpen = state.isSelectedVideoSheetOpen,

0 commit comments

Comments
 (0)