all: fix log statements
Fix messy and useless log statements throughout the app.
This commit is contained in:
parent
54724517ae
commit
10d05b1f26
8 changed files with 21 additions and 14 deletions
|
@ -343,7 +343,7 @@ class HomeFragment :
|
|||
// the current sort of the tab.
|
||||
if (isCurrentMode || isCurrentlyAscending || isCurrentlyDescending) {
|
||||
logD(
|
||||
"Checking $option [mode: $isCurrentMode asc: $$isCurrentlyAscending dec: $isCurrentlyDescending]")
|
||||
"Checking $option option [mode: $isCurrentMode asc: $isCurrentlyAscending dec: $isCurrentlyDescending]")
|
||||
// Note: We cannot inline this boolean assignment since it unchecks all other radio
|
||||
// buttons (even when setting it to false), which would result in nothing being
|
||||
// selected.
|
||||
|
@ -353,7 +353,7 @@ class HomeFragment :
|
|||
// Disable options that are not allowed by the isVisible lambda
|
||||
option.isVisible = isVisible(option.itemId)
|
||||
if (!option.isVisible) {
|
||||
logD("Hiding $option")
|
||||
logD("Hiding $option option")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -467,13 +467,11 @@ class HomeFragment :
|
|||
|
||||
when (progress) {
|
||||
is IndexingProgress.Indeterminate -> {
|
||||
logD("Showing generic progress")
|
||||
// In a query/initialization state, show a generic loading status.
|
||||
binding.homeIndexingStatus.text = getString(R.string.lng_indexing)
|
||||
binding.homeIndexingProgress.isIndeterminate = true
|
||||
}
|
||||
is IndexingProgress.Songs -> {
|
||||
logD("Showing song progress")
|
||||
// Actively loading songs, show the current progress.
|
||||
binding.homeIndexingStatus.text =
|
||||
getString(R.string.fmt_indexing, progress.current, progress.total)
|
||||
|
@ -492,7 +490,7 @@ class HomeFragment :
|
|||
// displaying the shuffle FAB makes no sense. We also don't want the fast scroll
|
||||
// popup to overlap with the FAB, so we hide the FAB when fast scrolling too.
|
||||
if (songs.isEmpty() || isFastScrolling) {
|
||||
logD("Hiding fab: [empty: ${songs.isEmpty()} scrolling: $isFastScrolling")
|
||||
logD("Hiding fab: [empty: ${songs.isEmpty()} scrolling: $isFastScrolling]")
|
||||
binding.homeFab.hide()
|
||||
} else {
|
||||
logD("Showing fab")
|
||||
|
|
|
@ -143,7 +143,6 @@ constructor(
|
|||
|
||||
override fun onMusicChanges(changes: MusicRepository.Changes) {
|
||||
val deviceLibrary = musicRepository.deviceLibrary
|
||||
logD(changes.deviceLibrary)
|
||||
if (changes.deviceLibrary && deviceLibrary != null) {
|
||||
logD("Refreshing library")
|
||||
// Get the each list of items in the library to use as our list data.
|
||||
|
|
|
@ -41,7 +41,6 @@ import org.oxycblt.auxio.music.resolveNames
|
|||
import org.oxycblt.auxio.util.context
|
||||
import org.oxycblt.auxio.util.getPlural
|
||||
import org.oxycblt.auxio.util.inflater
|
||||
import org.oxycblt.auxio.util.logD
|
||||
|
||||
/**
|
||||
* A [RecyclerView.ViewHolder] that displays a [Song]. Use [from] to create an instance.
|
||||
|
@ -331,7 +330,6 @@ class BasicHeaderViewHolder private constructor(private val binding: ItemHeaderB
|
|||
* @param basicHeader The new [BasicHeader] to bind.
|
||||
*/
|
||||
fun bind(basicHeader: BasicHeader) {
|
||||
logD(binding.context.getString(basicHeader.titleRes))
|
||||
binding.title.text = binding.context.getString(basicHeader.titleRes)
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,8 @@ import org.oxycblt.auxio.util.logW
|
|||
*
|
||||
* @author Alexander Capehart (OxygenCobalt)
|
||||
*
|
||||
* TODO: Switch listener to set
|
||||
* TODO: Switch listeners to set when you can confirm there are no order-dependent listener
|
||||
* configurations
|
||||
*/
|
||||
interface MusicRepository {
|
||||
/** The current music information found on the device. */
|
||||
|
|
|
@ -49,6 +49,8 @@ import org.oxycblt.auxio.util.logD
|
|||
* An [ViewModel] that provides a safe UI frontend for the current playback state.
|
||||
*
|
||||
* @author Alexander Capehart (OxygenCobalt)
|
||||
*
|
||||
* TODO: Debug subtle backwards movement of position on pause
|
||||
*/
|
||||
@HiltViewModel
|
||||
class PlaybackViewModel
|
||||
|
|
|
@ -232,7 +232,7 @@ class PlaybackService :
|
|||
return
|
||||
}
|
||||
|
||||
logD("Loading ${song.name}")
|
||||
logD("Loading $song")
|
||||
player.setMediaItem(MediaItem.fromUri(song.uri))
|
||||
player.prepare()
|
||||
player.playWhenReady = play
|
||||
|
|
|
@ -33,10 +33,17 @@ import org.oxycblt.auxio.util.logD
|
|||
*
|
||||
* @author Alexander Capehart (OxygenCobalt)
|
||||
*/
|
||||
class AnimatedMaterialButton
|
||||
@JvmOverloads
|
||||
constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) :
|
||||
RippleFixMaterialButton(context, attrs, defStyleAttr) {
|
||||
class AnimatedMaterialButton : RippleFixMaterialButton {
|
||||
constructor(context: Context) : super(context)
|
||||
|
||||
constructor(context: Context, attrs: AttributeSet) : super(context, attrs)
|
||||
|
||||
constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet,
|
||||
defStyleAttr: Int
|
||||
) : super(context, attrs, defStyleAttr)
|
||||
|
||||
private var currentCornerRadiusRatio = 0f
|
||||
private var animator: ValueAnimator? = null
|
||||
|
||||
|
|
|
@ -35,6 +35,8 @@ import org.oxycblt.auxio.util.logD
|
|||
* Implements the fuzzy-ish searching algorithm used in the search view.
|
||||
*
|
||||
* @author Alexander Capehart
|
||||
*
|
||||
* TODO: Handle locale changes
|
||||
*/
|
||||
interface SearchEngine {
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue