refactor: добавить вызов flush после инициализации данных
This commit is contained in:
@@ -55,18 +55,21 @@ class HiveService {
|
||||
if (catBox.isEmpty) {
|
||||
_logger.i('Filling initial categories');
|
||||
await catBox.addAll(CategoryUtils.getDefaultCategories());
|
||||
await catBox.flush();
|
||||
}
|
||||
|
||||
final tagBox = tags;
|
||||
if (tagBox.isEmpty) {
|
||||
_logger.i('Filling initial tags');
|
||||
await tagBox.addAll(TagUtils.getDefaultTags());
|
||||
await tagBox.flush();
|
||||
}
|
||||
|
||||
final transactionBox = transactions;
|
||||
if (transactionBox.isEmpty) {
|
||||
_logger.i('Filling sample transactions');
|
||||
await transactionBox.addAll(TransactionUtils.getSampleTransactions());
|
||||
await transactionBox.flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user