all: cleanup code
Cleanup the codebase in general: - Remove useless resources - Upgrade kotlin to 1.5.2 - Upgrade coil to 1.2.2
This commit is contained in:
@@ -14,7 +14,6 @@ import java.lang.Exception
|
||||
* The main storage for music items. Use [MusicStore.getInstance] to get the single instance of it.
|
||||
* @author OxygenCobalt
|
||||
* TODO: Modernize the blacklist system to Android 10+
|
||||
* TODO: Investigate issue where flac files have no years
|
||||
*/
|
||||
class MusicStore private constructor() {
|
||||
private var mGenres = listOf<Genre>()
|
||||
|
||||
@@ -36,9 +36,6 @@ class PlaybackFragment : Fragment(), SeekBar.OnSeekBarChangeListener {
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View {
|
||||
// TODO: Add a swipe-to-next-track function using a ViewPager
|
||||
// Would require writing my own variant though to avoid index updates
|
||||
|
||||
val normalTextColor = binding.playbackDurationCurrent.currentTextColor
|
||||
val accentColor = Accent.get().getStateList(requireContext())
|
||||
val controlColor = R.color.control_color.toStateList(requireContext())
|
||||
|
||||
@@ -160,9 +160,11 @@ class PlaybackSessionConnector(
|
||||
|
||||
private fun getPlayerState(): Int {
|
||||
if (playbackManager.song == null) {
|
||||
// No song, player should be stopped
|
||||
return PlaybackStateCompat.STATE_STOPPED
|
||||
}
|
||||
|
||||
// Otherwise play/pause
|
||||
return if (playbackManager.isPlaying) {
|
||||
PlaybackStateCompat.STATE_PLAYING
|
||||
} else {
|
||||
|
||||
@@ -15,7 +15,6 @@ import org.oxycblt.auxio.music.Song
|
||||
* off the given sorting mode.
|
||||
* @property iconRes The icon for this [SortMode]
|
||||
* @author OxygenCobalt
|
||||
* TODO: Make SortMode use title case [skip the/a(n)]
|
||||
*/
|
||||
enum class SortMode(@DrawableRes val iconRes: Int) {
|
||||
// Icons for each mode are assigned to the enums themselves
|
||||
|
||||
@@ -92,7 +92,5 @@ class AboutFragment : Fragment() {
|
||||
private const val LINK_CODEBASE = "https://github.com/oxygencobalt/Auxio"
|
||||
private const val LINK_FAQ = "$LINK_CODEBASE/blob/master/info/FAQ.md"
|
||||
private const val LINK_LICENSES = "$LINK_CODEBASE/blob/master/info/LICENSES.md"
|
||||
|
||||
const val TAG = "TAG_ABOUT_DIALOG"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.oxycblt.auxio.recycler.DisplayMode
|
||||
import org.oxycblt.auxio.ui.ACCENTS
|
||||
import org.oxycblt.auxio.ui.Accent
|
||||
|
||||
// A couple of utils for migrating from old settings values to the new the new
|
||||
// A couple of utils for migrating from old settings values to the new
|
||||
// formats used in 1.3.2 & 1.4.0
|
||||
|
||||
fun handleThemeCompat(prefs: SharedPreferences): Int {
|
||||
|
||||
@@ -73,7 +73,7 @@ class BlacklistViewModel(context: Context) : ViewModel() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if changes have been made to the viewmodel's paths.
|
||||
* Check if changes have been made to the ViewModel's paths.
|
||||
*/
|
||||
fun isModified() = dbPaths != paths.value
|
||||
|
||||
|
||||
Reference in New Issue
Block a user