all: reformat
This commit is contained in:
@@ -400,8 +400,7 @@ constructor(
|
||||
val query = Query(source = locations, exclude = emptyList())
|
||||
val storage = Storage(cache, covers, storedPlaylists, fileTreeCache)
|
||||
val interpretation = Interpretation(nameFactory, separators, withHidden)
|
||||
val result =
|
||||
Musikr.new(context, storage, interpretation).run(query, ::emitIndexingProgress)
|
||||
val result = Musikr.new(context, storage, interpretation).run(query, ::emitIndexingProgress)
|
||||
// Music loading completed, update the revision right now so we re-use this work
|
||||
// later.
|
||||
musicSettings.revision = newRevision
|
||||
|
||||
@@ -85,8 +85,7 @@ class MusicSettingsImpl @Inject constructor(@ApplicationContext private val cont
|
||||
}
|
||||
set(value) {
|
||||
sharedPreferences.edit {
|
||||
putString(
|
||||
getString(R.string.set_key_music_locations), value.stringify())
|
||||
putString(getString(R.string.set_key_music_locations), value.stringify())
|
||||
commit()
|
||||
// Sometimes changing this setting just won't actually trigger the listener.
|
||||
// Only this one. No idea why.
|
||||
@@ -139,7 +138,6 @@ class MusicSettingsImpl @Inject constructor(@ApplicationContext private val cont
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun List<OpenedLocation>.stringify(): String =
|
||||
joinToString(separator = ";") { it.uri.toString().replace(";", "\\;") }
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ import org.oxycblt.auxio.databinding.ItemMusicLocationBinding
|
||||
import org.oxycblt.auxio.list.recycler.DialogRecyclerView
|
||||
import org.oxycblt.auxio.util.context
|
||||
import org.oxycblt.auxio.util.inflater
|
||||
import org.oxycblt.musikr.fs.Location
|
||||
import org.oxycblt.musikr.fs.OpenedLocation
|
||||
import timber.log.Timber as L
|
||||
|
||||
@@ -38,7 +37,8 @@ import timber.log.Timber as L
|
||||
class LocationAdapter(private val listener: Listener) : RecyclerView.Adapter<MusicDirViewHolder>() {
|
||||
private val _locations = mutableListOf<OpenedLocation>()
|
||||
/**
|
||||
* The current list of [OpenedLocation]s, may not line up with [OpenedLocation]s due to removals.
|
||||
* The current list of [OpenedLocation]s, may not line up with [OpenedLocation]s due to
|
||||
* removals.
|
||||
*/
|
||||
val locations: List<OpenedLocation> = _locations
|
||||
|
||||
|
||||
@@ -16,4 +16,5 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/locations_list_header"
|
||||
tools:listitem="@layout/item_music_location" />
|
||||
|
||||
</FrameLayout>
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user