mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-24 03:59:51 +00:00
Only store last document, when MacPass is terminating
Moved code from MPDocument to MPDocumentController
This commit is contained in:
@@ -92,6 +92,7 @@ typedef NS_OPTIONS(NSInteger, MPAppStartupState) {
|
||||
_userNotificationCenterDelegate = [[MPUserNotificationCenterDelegate alloc] init];
|
||||
self.itemActionMenuDelegate = [[MPEntryContextMenuDelegate alloc] init];
|
||||
_shouldOpenFile = NO;
|
||||
_isTerminating = NO;
|
||||
self.startupState = MPAppStartupStateNone;
|
||||
|
||||
[NSNotificationCenter.defaultCenter addObserver:self
|
||||
@@ -185,6 +186,7 @@ typedef NS_OPTIONS(NSInteger, MPAppStartupState) {
|
||||
}
|
||||
|
||||
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender {
|
||||
_isTerminating = YES;
|
||||
[self hideWelcomeWindow];
|
||||
if(MPTemporaryFileStorageCenter.defaultCenter.hasPendingStorages) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
|
||||
Reference in New Issue
Block a user