Add an preference to disable the blur effect on Android 12+
This commit is contained in:
@@ -22,7 +22,7 @@ internal val Context.dataStore: LauncherDataStore by dataStore(
|
||||
}
|
||||
)
|
||||
|
||||
internal const val SchemaVersion = 7
|
||||
internal const val SchemaVersion = 8
|
||||
|
||||
internal fun getMigrations(context: Context): List<DataMigration<Settings>> {
|
||||
return listOf(
|
||||
@@ -33,5 +33,6 @@ internal fun getMigrations(context: Context): List<DataMigration<Settings>> {
|
||||
Migration_4_5(),
|
||||
Migration_5_6(),
|
||||
Migration_6_7(),
|
||||
Migration_7_8(),
|
||||
)
|
||||
}
|
||||
@@ -11,6 +11,7 @@ fun createFactorySettings(context: Context): Settings {
|
||||
.setTheme(Settings.AppearanceSettings.Theme.System)
|
||||
.setColorScheme(Settings.AppearanceSettings.ColorScheme.Default)
|
||||
.setDimWallpaper(false)
|
||||
.setBlurWallpaper(true)
|
||||
.setCustomColors(Settings.AppearanceSettings.CustomColors.newBuilder()
|
||||
.setAdvancedMode(false)
|
||||
.setBaseColors(DefaultCustomColorsBase)
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package de.mm20.launcher2.preferences.migrations
|
||||
|
||||
import de.mm20.launcher2.preferences.Settings
|
||||
|
||||
class Migration_7_8: VersionedMigration(7, 8) {
|
||||
override suspend fun applyMigrations(builder: Settings.Builder): Settings.Builder {
|
||||
return builder.setAppearance(
|
||||
builder.appearance.toBuilder()
|
||||
.setBlurWallpaper(true)
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -77,6 +77,8 @@ message Settings {
|
||||
SystemDefault = 1;
|
||||
}
|
||||
Font font = 10;
|
||||
|
||||
bool blur_wallpaper = 11;
|
||||
}
|
||||
AppearanceSettings appearance = 2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user