Commit 77210a24 by huangzhicong

Merge remote-tracking branch 'origin/master'

parents ad7b5181 8980838e
......@@ -43,10 +43,14 @@ static def packageTime() {
dependencies {
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.activity:activity:1.4.0'
def activity_version = "1.4.0"
implementation "androidx.activity:activity:$activity_version"
implementation "androidx.activity:activity-ktx:$activity_version"
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0'
implementation 'com.google.code.gson:gson:2.9.0'
implementation('com.journeyapps:zxing-android-embedded:4.3.0') { transitive = false }
implementation 'com.google.zxing:core:3.4.0'
......@@ -60,6 +64,7 @@ dependencies {
def lifecycle_version = "2.4.1"
kapt "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-runtime:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
......
......@@ -94,7 +94,7 @@ class RecorderBottomSheet : BottomSheetDialogFragment() {
start = view.findViewById(R.id.start)
var maxDuration = arguments?.getInt(ARG_MAX_DURATION)
if (maxDuration == null || maxDuration == 0 || maxDuration > DEFAULT_MAX_RECORD_TIME) {
if (maxDuration == null || maxDuration <= 0 || maxDuration > DEFAULT_MAX_RECORD_TIME) {
maxDuration = DEFAULT_MAX_RECORD_TIME
}
// 显示的录音限制时长不包含最大值,因此需要-1
......
......@@ -20,6 +20,7 @@ class Result<T> {
}
fun failed(msg: String, data: T? = null) {
this.code = -1
this.msg = msg
this.data = data
}
......
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