Commit 0dc139b9 by huangzhicong

修复录音底栏的异常行为

1、限制最大录音时长为2分钟
2、修复结束录音退出整个界面的问题
parent 21b9cb77
...@@ -33,8 +33,8 @@ class RecorderBottomSheet : BottomSheetDialogFragment() { ...@@ -33,8 +33,8 @@ class RecorderBottomSheet : BottomSheetDialogFragment() {
private const val request_path = "request_path" private const val request_path = "request_path"
private const val ARG_MAX_DURATION = "arg_max_duration" private const val ARG_MAX_DURATION = "arg_max_duration"
// 默认最大允许录音时长(5分钟) // 默认最大允许录音时长(2分钟)
private const val DEFAULT_MAX_RECORD_TIME = 5 * 60 private const val DEFAULT_MAX_RECORD_TIME = 2 * 60
fun createRecorderBundle(): Bundle = Bundle() fun createRecorderBundle(): Bundle = Bundle()
...@@ -108,7 +108,6 @@ class RecorderBottomSheet : BottomSheetDialogFragment() { ...@@ -108,7 +108,6 @@ class RecorderBottomSheet : BottomSheetDialogFragment() {
} }
stop.setOnClickListener { stop.setOnClickListener {
recorderViewModel.stop() recorderViewModel.stop()
findNavController().popBackStack()
} }
start.setOnClickListener { start.setOnClickListener {
try { try {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment