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.
|
// the current sort of the tab.
|
||||||
if (isCurrentMode || isCurrentlyAscending || isCurrentlyDescending) {
|
if (isCurrentMode || isCurrentlyAscending || isCurrentlyDescending) {
|
||||||
logD(
|
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
|
// 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
|
// buttons (even when setting it to false), which would result in nothing being
|
||||||
// selected.
|
// selected.
|
||||||
|
|
@ -353,7 +353,7 @@ class HomeFragment :
|
||||||
// Disable options that are not allowed by the isVisible lambda
|
// Disable options that are not allowed by the isVisible lambda
|
||||||
option.isVisible = isVisible(option.itemId)
|
option.isVisible = isVisible(option.itemId)
|
||||||
if (!option.isVisible) {
|
if (!option.isVisible) {
|
||||||
logD("Hiding $option")
|
logD("Hiding $option option")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -467,13 +467,11 @@ class HomeFragment :
|
||||||
|
|
||||||
when (progress) {
|
when (progress) {
|
||||||
is IndexingProgress.Indeterminate -> {
|
is IndexingProgress.Indeterminate -> {
|
||||||
logD("Showing generic progress")
|
|
||||||
// In a query/initialization state, show a generic loading status.
|
// In a query/initialization state, show a generic loading status.
|
||||||
binding.homeIndexingStatus.text = getString(R.string.lng_indexing)
|
binding.homeIndexingStatus.text = getString(R.string.lng_indexing)
|
||||||
binding.homeIndexingProgress.isIndeterminate = true
|
binding.homeIndexingProgress.isIndeterminate = true
|
||||||
}
|
}
|
||||||
is IndexingProgress.Songs -> {
|
is IndexingProgress.Songs -> {
|
||||||
logD("Showing song progress")
|
|
||||||
// Actively loading songs, show the current progress.
|
// Actively loading songs, show the current progress.
|
||||||
binding.homeIndexingStatus.text =
|
binding.homeIndexingStatus.text =
|
||||||
getString(R.string.fmt_indexing, progress.current, progress.total)
|
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
|
// 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.
|
// popup to overlap with the FAB, so we hide the FAB when fast scrolling too.
|
||||||
if (songs.isEmpty() || isFastScrolling) {
|
if (songs.isEmpty() || isFastScrolling) {
|
||||||
logD("Hiding fab: [empty: ${songs.isEmpty()} scrolling: $isFastScrolling")
|
logD("Hiding fab: [empty: ${songs.isEmpty()} scrolling: $isFastScrolling]")
|
||||||
binding.homeFab.hide()
|
binding.homeFab.hide()
|
||||||
} else {
|
} else {
|
||||||
logD("Showing fab")
|
logD("Showing fab")
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,6 @@ constructor(
|
||||||
|
|
||||||
override fun onMusicChanges(changes: MusicRepository.Changes) {
|
override fun onMusicChanges(changes: MusicRepository.Changes) {
|
||||||
val deviceLibrary = musicRepository.deviceLibrary
|
val deviceLibrary = musicRepository.deviceLibrary
|
||||||
logD(changes.deviceLibrary)
|
|
||||||
if (changes.deviceLibrary && deviceLibrary != null) {
|
if (changes.deviceLibrary && deviceLibrary != null) {
|
||||||
logD("Refreshing library")
|
logD("Refreshing library")
|
||||||
// Get the each list of items in the library to use as our list data.
|
// 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.context
|
||||||
import org.oxycblt.auxio.util.getPlural
|
import org.oxycblt.auxio.util.getPlural
|
||||||
import org.oxycblt.auxio.util.inflater
|
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.
|
* 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.
|
* @param basicHeader The new [BasicHeader] to bind.
|
||||||
*/
|
*/
|
||||||
fun bind(basicHeader: BasicHeader) {
|
fun bind(basicHeader: BasicHeader) {
|
||||||
logD(binding.context.getString(basicHeader.titleRes))
|
|
||||||
binding.title.text = 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)
|
* @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 {
|
interface MusicRepository {
|
||||||
/** The current music information found on the device. */
|
/** 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.
|
* An [ViewModel] that provides a safe UI frontend for the current playback state.
|
||||||
*
|
*
|
||||||
* @author Alexander Capehart (OxygenCobalt)
|
* @author Alexander Capehart (OxygenCobalt)
|
||||||
|
*
|
||||||
|
* TODO: Debug subtle backwards movement of position on pause
|
||||||
*/
|
*/
|
||||||
@HiltViewModel
|
@HiltViewModel
|
||||||
class PlaybackViewModel
|
class PlaybackViewModel
|
||||||
|
|
|
||||||
|
|
@ -232,7 +232,7 @@ class PlaybackService :
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
logD("Loading ${song.name}")
|
logD("Loading $song")
|
||||||
player.setMediaItem(MediaItem.fromUri(song.uri))
|
player.setMediaItem(MediaItem.fromUri(song.uri))
|
||||||
player.prepare()
|
player.prepare()
|
||||||
player.playWhenReady = play
|
player.playWhenReady = play
|
||||||
|
|
|
||||||
|
|
@ -33,10 +33,17 @@ import org.oxycblt.auxio.util.logD
|
||||||
*
|
*
|
||||||
* @author Alexander Capehart (OxygenCobalt)
|
* @author Alexander Capehart (OxygenCobalt)
|
||||||
*/
|
*/
|
||||||
class AnimatedMaterialButton
|
class AnimatedMaterialButton : RippleFixMaterialButton {
|
||||||
@JvmOverloads
|
constructor(context: Context) : super(context)
|
||||||
constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) :
|
|
||||||
RippleFixMaterialButton(context, attrs, defStyleAttr) {
|
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 currentCornerRadiusRatio = 0f
|
||||||
private var animator: ValueAnimator? = null
|
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.
|
* Implements the fuzzy-ish searching algorithm used in the search view.
|
||||||
*
|
*
|
||||||
* @author Alexander Capehart
|
* @author Alexander Capehart
|
||||||
|
*
|
||||||
|
* TODO: Handle locale changes
|
||||||
*/
|
*/
|
||||||
interface SearchEngine {
|
interface SearchEngine {
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue