diff --git a/app/src/main/java/org/oxycblt/auxio/home/HomeFragment.kt b/app/src/main/java/org/oxycblt/auxio/home/HomeFragment.kt index 96e48f27e..fb6b40354 100644 --- a/app/src/main/java/org/oxycblt/auxio/home/HomeFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/home/HomeFragment.kt @@ -320,9 +320,8 @@ class HomeFragment : binding.homeIndexingError.isInvisible = state.error == null if (state.error != null) { binding.homeIndexingContainer.setOnClickListener { - findNavController().navigateSafe( - HomeFragmentDirections.reportError(state.error) - ) + findNavController() + .navigateSafe(HomeFragmentDirections.reportError(state.error)) } } } diff --git a/musikr/src/main/java/org/oxycblt/musikr/track/LocationObserver.kt b/musikr/src/main/java/org/oxycblt/musikr/track/LocationObserver.kt index fca57c4aa..f5e9cbda8 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/track/LocationObserver.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/track/LocationObserver.kt @@ -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 . + */ + package org.oxycblt.musikr.track import android.content.Context @@ -14,11 +32,7 @@ internal class LocationObserver( private val handler = Handler(Looper.getMainLooper()) init { - context.applicationContext.contentResolver.registerContentObserver( - location.uri, - true, - this - ) + context.applicationContext.contentResolver.registerContentObserver(location.uri, true, this) } fun release() { @@ -39,4 +53,4 @@ internal class LocationObserver( private companion object { const val REINDEX_DELAY_MS = 500L } -} \ No newline at end of file +} diff --git a/musikr/src/main/java/org/oxycblt/musikr/track/UpdateTracker.kt b/musikr/src/main/java/org/oxycblt/musikr/track/UpdateTracker.kt index 1e1c3db68..88a9dec98 100644 --- a/musikr/src/main/java/org/oxycblt/musikr/track/UpdateTracker.kt +++ b/musikr/src/main/java/org/oxycblt/musikr/track/UpdateTracker.kt @@ -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 . + */ + package org.oxycblt.musikr.track import android.content.Context @@ -13,7 +31,8 @@ interface UpdateTracker { } 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.clear() } -} \ No newline at end of file +}