all: fix formatting
This commit is contained in:
parent
68098b97ed
commit
04e81916f7
3 changed files with 43 additions and 11 deletions
|
@ -320,9 +320,8 @@ class HomeFragment :
|
||||||
binding.homeIndexingError.isInvisible = state.error == null
|
binding.homeIndexingError.isInvisible = state.error == null
|
||||||
if (state.error != null) {
|
if (state.error != null) {
|
||||||
binding.homeIndexingContainer.setOnClickListener {
|
binding.homeIndexingContainer.setOnClickListener {
|
||||||
findNavController().navigateSafe(
|
findNavController()
|
||||||
HomeFragmentDirections.reportError(state.error)
|
.navigateSafe(HomeFragmentDirections.reportError(state.error))
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2025 Auxio Project
|
||||||
|
* LocationObserver.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.musikr.track
|
package org.oxycblt.musikr.track
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
@ -14,11 +32,7 @@ internal class LocationObserver(
|
||||||
private val handler = Handler(Looper.getMainLooper())
|
private val handler = Handler(Looper.getMainLooper())
|
||||||
|
|
||||||
init {
|
init {
|
||||||
context.applicationContext.contentResolver.registerContentObserver(
|
context.applicationContext.contentResolver.registerContentObserver(location.uri, true, this)
|
||||||
location.uri,
|
|
||||||
true,
|
|
||||||
this
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun release() {
|
fun release() {
|
||||||
|
@ -39,4 +53,4 @@ internal class LocationObserver(
|
||||||
private companion object {
|
private companion object {
|
||||||
const val REINDEX_DELAY_MS = 500L
|
const val REINDEX_DELAY_MS = 500L
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2025 Auxio Project
|
||||||
|
* UpdateTracker.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.musikr.track
|
package org.oxycblt.musikr.track
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
@ -13,7 +31,8 @@ interface UpdateTracker {
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun from(context: Context, callback: Callback): UpdateTracker = UpdateTrackerImpl(context, callback)
|
fun from(context: Context, callback: Callback): UpdateTracker =
|
||||||
|
UpdateTrackerImpl(context, callback)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,4 +51,4 @@ private class UpdateTrackerImpl(
|
||||||
observers.forEach { it.release() }
|
observers.forEach { it.release() }
|
||||||
observers.clear()
|
observers.clear()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue