Skip to content

Commit

Permalink
Fix: Add @SuppressLint("DefaultLocale") to formatAsAudioDuration
Browse files Browse the repository at this point in the history
Added `@SuppressLint("DefaultLocale")` to the `formatAsAudioDuration` extension
 property. This annotation suppresses the lint warning related to locale-dependent string formatting in this specific case.
  • Loading branch information
youndon committed Jan 15, 2025
1 parent 35eb518 commit 21c1cdc
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package city.zouitel.audios.audio

import android.annotation.SuppressLint
import city.zouitel.audios.model.Audio
import city.zouitel.audios.state.SingleAudioUiState
import java.util.concurrent.TimeUnit
import kotlin.math.log2
import kotlin.math.pow

val Long.formatAsAudioDuration: String get() = TimeUnit.MILLISECONDS.let { timeUnit ->
val Long.formatAsAudioDuration: String @SuppressLint("DefaultLocale")
get() = TimeUnit.MILLISECONDS.let { timeUnit ->
String.format(
"%d:%d",
timeUnit.toMinutes(this),
Expand Down

0 comments on commit 21c1cdc

Please sign in to comment.