Add show grid labels and fill clock widget height preferences to proto schema
This commit is contained in:
parent
694b0e1382
commit
bdbbc3760e
@ -22,7 +22,7 @@ internal val Context.dataStore: LauncherDataStore by dataStore(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
internal const val SchemaVersion = 8
|
internal const val SchemaVersion = 9
|
||||||
|
|
||||||
internal fun getMigrations(context: Context): List<DataMigration<Settings>> {
|
internal fun getMigrations(context: Context): List<DataMigration<Settings>> {
|
||||||
return listOf(
|
return listOf(
|
||||||
@ -34,5 +34,6 @@ internal fun getMigrations(context: Context): List<DataMigration<Settings>> {
|
|||||||
Migration_5_6(),
|
Migration_5_6(),
|
||||||
Migration_6_7(),
|
Migration_6_7(),
|
||||||
Migration_7_8(),
|
Migration_7_8(),
|
||||||
|
Migration_8_9(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package de.mm20.launcher2.preferences.migrations
|
||||||
|
|
||||||
|
import de.mm20.launcher2.preferences.Settings
|
||||||
|
|
||||||
|
class Migration_8_9: VersionedMigration(8, 9) {
|
||||||
|
override suspend fun applyMigrations(builder: Settings.Builder): Settings.Builder {
|
||||||
|
return builder
|
||||||
|
.setClockWidget(
|
||||||
|
builder.clockWidget.toBuilder()
|
||||||
|
.setFillHeight(true)
|
||||||
|
)
|
||||||
|
.setGrid(
|
||||||
|
builder.grid.toBuilder()
|
||||||
|
.setShowLabels(true)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -120,6 +120,7 @@ message Settings {
|
|||||||
bool battery_part = 5;
|
bool battery_part = 5;
|
||||||
bool alarm_part = 6;
|
bool alarm_part = 6;
|
||||||
bool favorites_part = 7;
|
bool favorites_part = 7;
|
||||||
|
bool fill_height = 8;
|
||||||
}
|
}
|
||||||
ClockWidgetSettings clock_widget = 7;
|
ClockWidgetSettings clock_widget = 7;
|
||||||
|
|
||||||
@ -192,6 +193,7 @@ message Settings {
|
|||||||
message GridSettings {
|
message GridSettings {
|
||||||
uint32 column_count = 1;
|
uint32 column_count = 1;
|
||||||
uint32 icon_size = 2;
|
uint32 icon_size = 2;
|
||||||
|
bool show_labels = 3;
|
||||||
}
|
}
|
||||||
GridSettings grid = 19;
|
GridSettings grid = 19;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user