Bring back the option to disable the clock widget's date part
This commit is contained in:
@@ -22,7 +22,7 @@ internal val Context.dataStore: LauncherDataStore by dataStore(
|
||||
}
|
||||
)
|
||||
|
||||
internal const val SchemaVersion = 12
|
||||
internal const val SchemaVersion = 13
|
||||
|
||||
internal fun getMigrations(context: Context): List<DataMigration<Settings>> {
|
||||
return listOf(
|
||||
@@ -38,5 +38,6 @@ internal fun getMigrations(context: Context): List<DataMigration<Settings>> {
|
||||
Migration_9_10(),
|
||||
Migration_10_11(),
|
||||
Migration_11_12(),
|
||||
Migration_12_13(),
|
||||
)
|
||||
}
|
||||
@@ -51,6 +51,7 @@ fun createFactorySettings(context: Context): Settings {
|
||||
.setAlarmPart(true)
|
||||
.setBatteryPart(true)
|
||||
.setMusicPart(true)
|
||||
.setDatePart(true)
|
||||
.setFavoritesPart(false)
|
||||
.setFillHeight(true)
|
||||
.build()
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package de.mm20.launcher2.preferences.migrations
|
||||
|
||||
import de.mm20.launcher2.preferences.Settings
|
||||
|
||||
class Migration_12_13: VersionedMigration(12, 13) {
|
||||
override suspend fun applyMigrations(builder: Settings.Builder): Settings.Builder {
|
||||
return builder
|
||||
.setClockWidget(
|
||||
builder.clockWidget.toBuilder()
|
||||
.setDatePart(true)
|
||||
.build()
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -116,7 +116,7 @@ message Settings {
|
||||
EmptyClock = 4;
|
||||
}
|
||||
ClockStyle clock_style = 2;
|
||||
reserved 3;
|
||||
bool date_part = 3;
|
||||
bool music_part = 4;
|
||||
bool battery_part = 5;
|
||||
bool alarm_part = 6;
|
||||
|
||||
Reference in New Issue
Block a user