From 30d05bdaa9de6d131e76fbe7e7f3f0e8fffa2eb9 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 5 May 2020 15:04:30 +0200 Subject: [PATCH] updating commosn to 5.27.6 --- app/build.gradle | 2 +- .../simplemobiletools/voicerecorder/fragments/PlayerFragment.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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)