settings: enable theme customization on >31

Enable theme customization on API 31.

Some people prefer some themes over others, so enable it. Not like it
increases complexity.

Resolves #243.
This commit is contained in:
Alexander Capehart 2022-09-24 15:35:44 -06:00
parent c3de8fe4fd
commit adf85a8fab
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47
5 changed files with 14 additions and 19 deletions

View file

@ -17,6 +17,7 @@
- Added support for compilation sub-release-types like (DJ) Mix
- Album dates now start from the earliest date instead of latest date
- Reshuffling the queue will no longer drop any songs you have added/removed
- Allowed light/dark theme to be customized on Android 12+
#### What's Fixed
- Fixed issue where the scroll popup would not display correctly in landscape mode [#230]

View file

@ -205,20 +205,21 @@ sealed class MusicParent : Music() {
* @author OxygenCobalt
*/
class Song constructor(raw: Raw, settings: Settings) : Music() {
override val uid = raw.musicBrainzId?.toUuidOrNull()?.let { UID.musicBrainz(MusicMode.SONGS, it) } ?: UID.auxio(MusicMode.SONGS) {
// Song UIDs are based on the raw data without parsing so that they remain
// consistent across music setting changes. Parents are not held up to the
// same standard since grouping is already inherently linked to settings.
update(raw.name)
update(raw.albumName)
update(raw.date)
override val uid = raw.musicBrainzId?.toUuidOrNull()?.let { UID.musicBrainz(MusicMode.SONGS, it) }
?: UID.auxio(MusicMode.SONGS) {
// Song UIDs are based on the raw data without parsing so that they remain
// consistent across music setting changes. Parents are not held up to the
// same standard since grouping is already inherently linked to settings.
update(raw.name)
update(raw.albumName)
update(raw.date)
update(raw.track)
update(raw.disc)
update(raw.track)
update(raw.disc)
update(raw.artistNames)
update(raw.albumArtistNames)
}
update(raw.artistNames)
update(raw.albumArtistNames)
}
override val rawName = requireNotNull(raw.name) { "Invalid raw: No title" }

View file

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="enable_theme_settings">false</bool>
</resources>

View file

@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="enable_theme_settings">true</bool>
<!-- Note: The old way of naming keys was to prefix them with KEY_. Now it's to prefix them with auxio_. -->
<string name="set_key_theme" translatable="false">KEY_THEME2</string>
<string name="set_key_black_theme" translatable="false">KEY_BLACK_THEME</string>

View file

@ -8,7 +8,6 @@
app:entryIcons="@array/icons_theme"
app:entryValues="@array/values_theme"
app:icon="@drawable/ic_light_24"
app:isPreferenceVisible="@bool/enable_theme_settings"
app:key="@string/set_key_theme"
app:title="@string/set_theme" />