Skip to content

Commit

Permalink
all: fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
OxygenCobalt committed Dec 26, 2024
1 parent 5e7d575 commit dc8cbc7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -46,7 +44,9 @@ import timber.log.Timber as L
*/
@AndroidEntryPoint
class MusicSourcesDialog :
ViewBindingMaterialDialogFragment<DialogMusicLocationsBinding>(), LocationAdapter.Listener, NewLocationFooterAdapter.Listener {
ViewBindingMaterialDialogFragment<DialogMusicLocationsBinding>(),
LocationAdapter.Listener,
NewLocationFooterAdapter.Listener {
private val locationAdapter = LocationAdapter(this)
private val locationFooterAdapter = NewLocationFooterAdapter(this)
private var openDocumentTreeLauncher: ActivityResultLauncher<Uri?>? = null
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <https://www.gnu.org/licenses/>.
*/

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
Expand All @@ -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()
}
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit dc8cbc7

Please sign in to comment.