diff --git a/app/build.gradle b/app/build.gradle index 473eacc..9b20908 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -57,7 +57,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.26.33' + implementation 'com.simplemobiletools:commons:5.27.6' implementation 'org.greenrobot:eventbus:3.2.0' implementation 'com.github.Armen101:AudioRecordView:1.0.2' } diff --git a/app/src/main/kotlin/com/simplemobiletools/voicerecorder/fragments/PlayerFragment.kt b/app/src/main/kotlin/com/simplemobiletools/voicerecorder/fragments/PlayerFragment.kt index e5baaad..d6c00a4 100644 --- a/app/src/main/kotlin/com/simplemobiletools/voicerecorder/fragments/PlayerFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/voicerecorder/fragments/PlayerFragment.kt @@ -213,7 +213,7 @@ class PlayerFragment(context: Context, attributeSet: AttributeSet) : MyViewPager val title = it.name val path = it.absolutePath val timestamp = (it.lastModified() / 1000).toInt() - val duration = it.absolutePath.getFileDurationSeconds() ?: 0 + val duration = context.getDuration(it.absolutePath) ?: 0 val size = it.length().toInt() val recording = Recording(id, title, path, timestamp, duration, size) recordings.add(recording)