Skip to content

Commit

Permalink
db: reload instance after switching
Browse files Browse the repository at this point in the history
  • Loading branch information
violet-dev committed Nov 5, 2023
1 parent 29d030b commit 097fa3b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/pages/database_download/database_download_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ class DataBaseDownloadPageState extends State<DataBaseDownloadPage> {
'databasesync', SyncManager.getLatestDB().getDateTime().toString());
await prefs.setInt('synclatest', SyncManager.getLatestDB().timestamp);

await DataBaseManager.reloadInstance();

if (Settings.useOptimizeDatabase) {
await deleteUnused();

Expand Down Expand Up @@ -242,6 +244,8 @@ class DataBaseDownloadPageState extends State<DataBaseDownloadPage> {
downloading = false;
});

await DataBaseManager.reloadInstance();

if (Settings.useOptimizeDatabase) await deleteUnused();

await indexing();
Expand Down

0 comments on commit 097fa3b

Please sign in to comment.