2022-07-17 21:32:04 +02:00
|
|
|
import 'package:logging/logging.dart';
|
2024-08-17 20:01:59 +02:00
|
|
|
import 'package:nc_photos/controller/pref_controller.dart';
|
2023-12-06 15:05:33 +01:00
|
|
|
import 'package:nc_photos/db/entity_converter.dart';
|
2022-12-16 16:01:04 +01:00
|
|
|
import 'package:np_codegen/np_codegen.dart';
|
2023-12-06 15:05:33 +01:00
|
|
|
import 'package:np_db/np_db.dart';
|
2022-07-17 21:32:04 +02:00
|
|
|
|
2022-12-16 16:01:04 +01:00
|
|
|
part 'v46.g.dart';
|
|
|
|
|
|
|
|
@npLog
|
2022-07-17 21:32:04 +02:00
|
|
|
class CompatV46 {
|
2024-08-17 20:01:59 +02:00
|
|
|
static Future<void> insertDbAccounts(
|
|
|
|
PrefController prefController, NpDb db) async {
|
2022-07-17 21:32:04 +02:00
|
|
|
_log.info("[insertDbAccounts] Insert current accounts to Sqlite database");
|
2024-08-17 20:01:59 +02:00
|
|
|
final accounts = prefController.accountsValue;
|
2023-12-06 15:05:33 +01:00
|
|
|
await db.addAccounts(accounts.toDb());
|
2022-07-17 21:32:04 +02:00
|
|
|
}
|
|
|
|
|
2022-12-20 17:49:14 +01:00
|
|
|
static final _log = _$CompatV46NpLog.log;
|
2022-07-17 21:32:04 +02:00
|
|
|
}
|