feat: add setting for auto-lock fix: fix sideswipe
This commit is contained in:
@@ -106,6 +106,9 @@ class AppSettingsTable extends Table {
|
||||
|
||||
BoolColumn get pinRequired => boolean().withDefault(const Constant(false))();
|
||||
|
||||
BoolColumn get autoLockEnabled =>
|
||||
boolean().withDefault(const Constant(true))();
|
||||
|
||||
TextColumn get themeMode => text().withDefault(const Constant('system'))();
|
||||
|
||||
TextColumn get language => text().withDefault(const Constant('system'))();
|
||||
@@ -132,7 +135,7 @@ class AppDatabase extends _$AppDatabase {
|
||||
AppDatabase([QueryExecutor? executor]) : super(executor ?? _openConnection());
|
||||
|
||||
@override
|
||||
int get schemaVersion => 8;
|
||||
int get schemaVersion => 9;
|
||||
|
||||
@override
|
||||
MigrationStrategy get migration {
|
||||
@@ -181,6 +184,13 @@ class AppDatabase extends _$AppDatabase {
|
||||
appSettingsTable.barGridRows,
|
||||
);
|
||||
}
|
||||
|
||||
if (from < 9 && !await hasSettingsColumn('auto_lock_enabled')) {
|
||||
await migrator.addColumn(
|
||||
appSettingsTable,
|
||||
appSettingsTable.autoLockEnabled,
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user