Show config reload notification when edit config using xcode

This commit is contained in:
yicheng 2019-12-14 14:03:27 +08:00
parent cf78bcb834
commit e1ce6b35db
2 changed files with 4 additions and 3 deletions

View File

@ -1,11 +1,12 @@
//
import AppKit
// ConfigFileFactory.swift
// ClashX
//
// Created by CYC on 2018/8/5.
// Copyright © 2018 yichengchen. All rights reserved.
//
import AppKit
import Foundation
import SwiftyJSON
@ -28,7 +29,7 @@ class ConfigFileManager {
return
}
for event in events {
if event.flags.contains(.ItemModified) {
if event.flags.contains(.ItemModified) || event.flags.contains(.ItemRenamed) {
NSUserNotificationCenter.default
.postConfigFileChangeDetectionNotice()
NotificationCenter.default