deps: upgrade
AndroidX core -> 1.8.0 Material Components -> 1.6.1
This commit is contained in:
parent
b0ec6faa33
commit
66b95cef42
5 changed files with 16 additions and 14 deletions
|
@ -1,6 +1,8 @@
|
|||
# Changelog
|
||||
|
||||
## dev [v2.3.1, v2.4.0, or v3.0.0]
|
||||
## dev [v2.3.2, v2.4.0, or v3.0.0]
|
||||
|
||||
## v2.3.1
|
||||
|
||||
#### What's Improved
|
||||
- Loading UI is now more clear and easy-to-use
|
||||
|
|
|
@ -56,12 +56,12 @@ dependencies {
|
|||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2"
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.2'
|
||||
|
||||
// --- SUPPORT ---
|
||||
|
||||
// General
|
||||
implementation "androidx.core:core-ktx:1.7.0"
|
||||
implementation "androidx.core:core-ktx:1.8.0"
|
||||
implementation "androidx.activity:activity-ktx:1.4.0"
|
||||
implementation "androidx.fragment:fragment-ktx:1.4.1"
|
||||
|
||||
|
@ -100,7 +100,7 @@ dependencies {
|
|||
implementation "io.coil-kt:coil:2.1.0"
|
||||
|
||||
// Material
|
||||
implementation "com.google.android.material:material:1.6.0"
|
||||
implementation "com.google.android.material:material:1.6.1"
|
||||
|
||||
// LeakCanary
|
||||
debugImplementation "com.squareup.leakcanary:leakcanary-android:2.9.1"
|
||||
|
|
|
@ -28,8 +28,9 @@ import com.google.android.exoplayer2.source.TrackGroupArray
|
|||
import com.google.common.util.concurrent.FutureCallback
|
||||
import com.google.common.util.concurrent.Futures
|
||||
import java.util.concurrent.ConcurrentLinkedQueue
|
||||
import java.util.concurrent.Executors
|
||||
import java.util.concurrent.Future
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.asExecutor
|
||||
import org.oxycblt.auxio.music.MusicStore
|
||||
import org.oxycblt.auxio.music.Song
|
||||
import org.oxycblt.auxio.util.logW
|
||||
|
@ -92,7 +93,9 @@ class ExoPlayerBackend(private val inner: MediaStoreBackend) : Indexer.Backend {
|
|||
callback.onLoadStateChanged(
|
||||
MusicStore.LoadState.Indexing(songs.size, cursor.count))
|
||||
},
|
||||
CALLBACK_EXECUTOR)
|
||||
// Normal JVM dispatcher will suffice here, as there is no IO work
|
||||
// going on (and there is no cost from switching contexts with executors)
|
||||
Dispatchers.Default.asExecutor())
|
||||
|
||||
runningTasks[index] = task
|
||||
|
||||
|
@ -114,7 +117,7 @@ class ExoPlayerBackend(private val inner: MediaStoreBackend) : Indexer.Backend {
|
|||
) : FutureCallback<TrackGroupArray> {
|
||||
override fun onSuccess(result: TrackGroupArray) {
|
||||
val metadata = result[0].getFormat(0).metadata
|
||||
|
||||
|
||||
if (metadata != null) {
|
||||
completeAudio(audio, metadata)
|
||||
} else {
|
||||
|
@ -217,7 +220,5 @@ class ExoPlayerBackend(private val inner: MediaStoreBackend) : Indexer.Backend {
|
|||
companion object {
|
||||
/** The amount of tasks this backend can run efficiently at once. */
|
||||
private const val TASK_CAPACITY = 8
|
||||
|
||||
private val CALLBACK_EXECUTOR = Executors.newSingleThreadExecutor()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ object Indexer {
|
|||
else -> Api21MediaStoreBackend()
|
||||
}
|
||||
|
||||
val songs = buildSongs(context, mediaStoreBackend, callback)
|
||||
val songs = buildSongs(context, ExoPlayerBackend(mediaStoreBackend), callback)
|
||||
if (songs.isEmpty()) {
|
||||
return null
|
||||
}
|
||||
|
|
|
@ -103,10 +103,9 @@ val String.id3v2GenreName: String
|
|||
// should copy mutagen's implementation?
|
||||
// https://github.com/quodlibet/mutagen/blob/master/mutagen/id3/_frames.py
|
||||
|
||||
val genreInt = substring(1 until lastIndex).toIntOrNull()
|
||||
if (genreInt != null) {
|
||||
return genreConstantTable.getOrNull(genreInt) ?: this
|
||||
}
|
||||
return substring(1 until lastIndex).toIntOrNull()?.run {
|
||||
genreConstantTable.getOrNull(this)
|
||||
} ?: this
|
||||
}
|
||||
|
||||
// Current name is fine.
|
||||
|
|
Loading…
Reference in a new issue