1
0
mirror of https://github.com/Toxblh/MTMR.git synced 2026-01-10 17:08:39 +00:00

Merge pull request #46 from ad/master

* trying to terminate app before forceTerminate (to prevent loosing of unsaved data)
This commit is contained in:
Anton Palgunov 2018-04-24 13:36:55 +01:00 committed by GitHub
commit aa95d1a1bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -178,7 +178,9 @@ class AppScrubberTouchBarItem: NSCustomTouchBarItem, NSScrubberDelegate, NSScrub
if (self.ticks > maxTicks) {
if let processIdentifier = applications[selected].pid {
NSRunningApplication(processIdentifier: processIdentifier)?.forceTerminate()
if !(NSRunningApplication(processIdentifier: processIdentifier)?.terminate())! {
NSRunningApplication(processIdentifier: processIdentifier)?.forceTerminate()
}
}
} else {
hf.tap(strong: 6)