|
@@ -80,7 +80,6 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
|
|
|
// self.addWindowController(currentWindowController!)
|
|
|
// mainViewController.browserWindowController = currentWindowController
|
|
|
|
|
|
-#if DEBUG
|
|
|
let activeBrowser = (currentWindowController?.browser.activeTabContents())! as CTTabContents
|
|
|
let activeIndex = Int((currentWindowController?.browser.activeTabIndex())!)
|
|
|
self.addWindowController(currentWindowController!)
|
|
@@ -104,21 +103,6 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
|
|
|
} else {
|
|
|
currentWindowController?.browser.add(self, at: Int32()-1, inForeground: true)
|
|
|
}
|
|
|
-#else
|
|
|
- // MARK TODO: 流程调整“开启PDF后,替换Home标签”
|
|
|
- let activeBrowser = (currentWindowController?.browser.activeTabContents())! as CTTabContents
|
|
|
- let activeIndex = Int((currentWindowController?.browser.activeTabIndex())!)
|
|
|
- currentWindowController?.browser.add(self, at: Int32()-1, inForeground: true)
|
|
|
- self.addWindowController(currentWindowController!)
|
|
|
- mainViewController?.browserWindowController = currentWindowController
|
|
|
-
|
|
|
- let ishome = activeBrowser.isHome as Bool
|
|
|
- let isfirstTab = (activeIndex == 0)
|
|
|
- if ishome && !isfirstTab {
|
|
|
- let contents = activeBrowser.browser.tabContents(at: Int32(activeIndex)) as CTTabContents
|
|
|
- activeBrowser.browser.closeTab(Int32(activeIndex))
|
|
|
- }
|
|
|
-#endif
|
|
|
}
|
|
|
}
|
|
|
}
|