Add preference to disable themed icons for themed icon packs

This commit is contained in:
MM20
2023-03-15 17:09:23 +01:00
parent 6f6d6451a9
commit 70b406eb5c
9 changed files with 139 additions and 58 deletions
@@ -22,7 +22,7 @@ internal val Context.dataStore: LauncherDataStore by dataStore(
}
)
internal const val SchemaVersion = 13
internal const val SchemaVersion = 14
internal fun getMigrations(context: Context): List<DataMigration<Settings>> {
return listOf(
@@ -39,5 +39,6 @@ internal fun getMigrations(context: Context): List<DataMigration<Settings>> {
Migration_10_11(),
Migration_11_12(),
Migration_12_13(),
Migration_13_14(),
)
}
@@ -145,6 +145,7 @@ fun createFactorySettings(context: Context): Settings {
.setShape(Settings.IconSettings.IconShape.PlatformDefault)
.setThemedIcons(false)
.setIconPack("")
.setIconPackThemed(true)
)
.setEasterEgg(false)
.setSystemBars(
@@ -0,0 +1,13 @@
package de.mm20.launcher2.preferences.migrations
import de.mm20.launcher2.preferences.Settings
class Migration_13_14 : VersionedMigration(13, 14) {
override suspend fun applyMigrations(builder: Settings.Builder): Settings.Builder {
return builder
.setIcons(
builder.icons.toBuilder()
.setIconPackThemed(true)
)
}
}
@@ -246,6 +246,7 @@ message Settings {
reserved 4;
bool adaptify = 5;
bool force_themed = 6;
bool icon_pack_themed = 7;
}
IconSettings icons = 21;