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
|
||||
// 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
|
||||
|
|
|
@ -36,7 +36,7 @@ class RemoteConfigViewController: NSViewController {
|
|||
self.showAdd(defaultUrl: url, name: name)
|
||||
}.disposed(by: disposeBag)
|
||||
}
|
||||
|
||||
|
||||
override func viewWillAppear() {
|
||||
super.viewWillAppear()
|
||||
NSApp.activate(ignoringOtherApps: true)
|
||||
|
|
Loading…
Reference in New Issue