diff --git a/yuuna/lib/src/models/app_model.dart b/yuuna/lib/src/models/app_model.dart index 500ad9b54..a3dcf47e6 100644 --- a/yuuna/lib/src/models/app_model.dart +++ b/yuuna/lib/src/models/app_model.dart @@ -2275,10 +2275,6 @@ class AppModel with ChangeNotifier { ); _isCreatorOpen = false; - - if (killOnPop) { - shutdown(); - } } /// Whether or not the media item should be killed upon exit. @@ -2366,7 +2362,6 @@ class AppModel with ChangeNotifier { DictionaryMediaType.instance.refreshTab(); if (_shouldKillMediaOnPop) { - databaseCloseNotifier.notifyListeners(); shutdown(); } } @@ -3333,6 +3328,7 @@ class AppModel with ChangeNotifier { /// Safely shutdown and stop database operations. void shutdown() async { + databaseCloseNotifier.notifyListeners(); await _database.close(); FlutterExitApp.exitApp(); } diff --git a/yuuna/lib/src/pages/implementations/creator_page.dart b/yuuna/lib/src/pages/implementations/creator_page.dart index cabc76c8c..561a88851 100644 --- a/yuuna/lib/src/pages/implementations/creator_page.dart +++ b/yuuna/lib/src/pages/implementations/creator_page.dart @@ -326,7 +326,11 @@ class _CreatorPageState extends BasePageState { appModel.savedTags; if (appModel.closeCreatorOnExport) { - Navigator.pop(context); + if (widget.killOnPop) { + appModel.shutdown(); + } else { + Navigator.pop(context); + } } }, ); diff --git a/yuuna/pubspec.yaml b/yuuna/pubspec.yaml index 77fb048e5..765b0bafa 100644 --- a/yuuna/pubspec.yaml +++ b/yuuna/pubspec.yaml @@ -1,7 +1,7 @@ name: yuuna description: A full-featured immersion language learning suite for mobile. publish_to: 'none' -version: 2.6.3+73 +version: 2.6.2+74 environment: sdk: ">=2.17.0 <3.0.0"