Show config reload notification when edit config using xcode
This commit is contained in:
parent
cf78bcb834
commit
e1ce6b35db
|
@ -1,11 +1,12 @@
|
||||||
//
|
//
|
||||||
import AppKit
|
|
||||||
// ConfigFileFactory.swift
|
// ConfigFileFactory.swift
|
||||||
// ClashX
|
// ClashX
|
||||||
//
|
//
|
||||||
// Created by CYC on 2018/8/5.
|
// Created by CYC on 2018/8/5.
|
||||||
// Copyright © 2018年 yichengchen. All rights reserved.
|
// Copyright © 2018年 yichengchen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
import AppKit
|
||||||
import Foundation
|
import Foundation
|
||||||
import SwiftyJSON
|
import SwiftyJSON
|
||||||
|
|
||||||
|
@ -28,7 +29,7 @@ class ConfigFileManager {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for event in events {
|
for event in events {
|
||||||
if event.flags.contains(.ItemModified) {
|
if event.flags.contains(.ItemModified) || event.flags.contains(.ItemRenamed) {
|
||||||
NSUserNotificationCenter.default
|
NSUserNotificationCenter.default
|
||||||
.postConfigFileChangeDetectionNotice()
|
.postConfigFileChangeDetectionNotice()
|
||||||
NotificationCenter.default
|
NotificationCenter.default
|
||||||
|
|
Loading…
Reference in New Issue