Database options for version migration

This commit is contained in:
relikd
2019-08-09 21:07:54 +02:00
parent dff1594926
commit c717487b0e
10 changed files with 139 additions and 11 deletions

View File

@@ -26,6 +26,7 @@
#import "Preferences.h"
#import "DrawImage.h"
#import "SettingsFeeds+DragDrop.h"
#import "UserPrefs.h"
@interface AppHook()
@property (strong) NSWindowController *prefWindow;
@@ -40,6 +41,7 @@
}
- (void)applicationWillFinishLaunching:(NSNotification *)notification {
[self migrateVersionUpdate];
_statusItem = [BarStatusItem new];
NSAppleEventManager *appleEventManager = [NSAppleEventManager sharedAppleEventManager];
[appleEventManager setEventHandler:self andSelector:@selector(handleGetURLEvent:withReplyEvent:)
@@ -177,6 +179,13 @@
return NSTerminateNow;
}
/// Called during application start. Perform any version dependent updates here
- (void)migrateVersionUpdate {
// Currently unused, but you'll be thankful to know the previous version number in the future
[UserPrefs dbUpdateFileVersion];
[UserPrefs dbUpdateAppVersion];
}
#pragma mark - Event Handling, Forward Send Key Down Events