|
@@ -306,6 +306,8 @@ class KMPageDisplayPropertiesButton: NSButton {
|
|
|
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(removeSecondaryPdfContentView(_:)), name: NSNotification.Name("KMSplitSinglePageNotification"), object: nil)
|
|
NotificationCenter.default.addObserver(self, selector: #selector(removeSecondaryPdfContentView(_:)), name: NSNotification.Name("KMSplitSinglePageNotification"), object: nil)
|
|
NotificationCenter.default.addObserver(self, selector: #selector(viewModeChangeUpdateState(_:)), name: Notification.Name("CPDFListViewDisplayModeChangeNotification"), object: nil)
|
|
NotificationCenter.default.addObserver(self, selector: #selector(viewModeChangeUpdateState(_:)), name: Notification.Name("CPDFListViewDisplayModeChangeNotification"), object: nil)
|
|
|
|
+ NotificationCenter.default.addObserver(self, selector: #selector(loginSuccessNotification), name: NSNotification.Name(rawValue: "MemberCenterLoginSuccess"), object: nil)
|
|
|
|
+ NotificationCenter.default.addObserver(self, selector: #selector(logoutSuccessNotification), name: NSNotification.Name(rawValue: "MemberCenterLogoutSuccess"), object: nil)
|
|
}
|
|
}
|
|
|
|
|
|
private func reloadReplaceView() {
|
|
private func reloadReplaceView() {
|
|
@@ -633,6 +635,14 @@ class KMPageDisplayPropertiesButton: NSButton {
|
|
@objc func viewModeChangNotification(_ notification: Notification) {
|
|
@objc func viewModeChangNotification(_ notification: Notification) {
|
|
reloadData()
|
|
reloadData()
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @objc func loginSuccessNotification() -> Void {
|
|
|
|
+ themeCollectionView.reloadData()
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @objc func logoutSuccessNotification() -> Void {
|
|
|
|
+ themeCollectionView.reloadData()
|
|
|
|
+ }
|
|
|
|
|
|
// override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
|
|
// override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
|
|
// guard let object = object as? YourObjectType, keyPath == "yourKeyPath" else {
|
|
// guard let object = object as? YourObjectType, keyPath == "yourKeyPath" else {
|