diff --git a/app/src/main/java/org/oxycblt/auxio/music/locations/MusicSourcesDialog.kt b/app/src/main/java/org/oxycblt/auxio/music/locations/MusicSourcesDialog.kt index b88ee9501..3ca75b8f6 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/locations/MusicSourcesDialog.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/locations/MusicSourcesDialog.kt @@ -25,8 +25,6 @@ import android.view.LayoutInflater import androidx.activity.result.ActivityResultLauncher import androidx.activity.result.contract.ActivityResultContracts import androidx.appcompat.app.AlertDialog -import androidx.core.view.ViewCompat -import androidx.core.view.isVisible import androidx.recyclerview.widget.ConcatAdapter import dagger.hilt.android.AndroidEntryPoint import javax.inject.Inject @@ -46,7 +44,9 @@ import timber.log.Timber as L */ @AndroidEntryPoint class MusicSourcesDialog : - ViewBindingMaterialDialogFragment(), LocationAdapter.Listener, NewLocationFooterAdapter.Listener { + ViewBindingMaterialDialogFragment(), + LocationAdapter.Listener, + NewLocationFooterAdapter.Listener { private val locationAdapter = LocationAdapter(this) private val locationFooterAdapter = NewLocationFooterAdapter(this) private var openDocumentTreeLauncher: ActivityResultLauncher? = null @@ -105,9 +105,7 @@ class MusicSourcesDialog : override fun onNewLocation() { L.d("Opening launcher") val launcher = - requireNotNull(openDocumentTreeLauncher) { - "Document tree launcher was not available" - } + requireNotNull(openDocumentTreeLauncher) { "Document tree launcher was not available" } try { launcher.launch(null) diff --git a/app/src/main/java/org/oxycblt/auxio/music/locations/NewLocationFooterAdapter.kt b/app/src/main/java/org/oxycblt/auxio/music/locations/NewLocationFooterAdapter.kt index 522cdec22..156c4c049 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/locations/NewLocationFooterAdapter.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/locations/NewLocationFooterAdapter.kt @@ -1,10 +1,27 @@ +/* + * Copyright (c) 2024 Auxio Project + * NewLocationFooterAdapter.kt is part of Auxio. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package org.oxycblt.auxio.music.locations import android.view.View import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView import org.oxycblt.auxio.databinding.ItemNewMusicLocationBinding -import org.oxycblt.auxio.databinding.ItemNewPlaylistChoiceBinding import org.oxycblt.auxio.list.recycler.DialogRecyclerView import org.oxycblt.auxio.music.decision.AddToPlaylistDialog import org.oxycblt.auxio.util.inflater @@ -28,9 +45,7 @@ class NewLocationFooterAdapter(private val listener: Listener) : /** A listener for [NewLocationFooterAdapter] interactions. */ interface Listener { - /** - * Called when the footer has been pressed, requesting to create a new location. - */ + /** Called when the footer has been pressed, requesting to create a new location. */ fun onNewLocation() } } diff --git a/build.gradle b/build.gradle index 049c1a542..a55368af8 100644 --- a/build.gradle +++ b/build.gradle @@ -31,7 +31,7 @@ plugins { id 'com.android.library' version "$agp_version" apply false id "org.jetbrains.kotlin.android" version "$kotlin_version" apply false id "com.google.devtools.ksp" version '2.0.21-1.0.25' apply false - // We use spotless in the root build.gradle to apply to all module + // We use spotless in the root build.gradle to apply to all modules. id "com.diffplug.spotless" version "6.25.0" apply true }