Skip to content

Commit

Permalink
fix show
Browse files Browse the repository at this point in the history
  • Loading branch information
DamonHu committed Jul 17, 2021
1 parent 8b32892 commit d5840ae
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion netfox-zxkit.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = 'netfox-zxkit'
s.swift_version = '5.0'
s.version = '0.0.3'
s.version = '0.0.4'
s.license= { :type => "Apache-2.0", :file => "LICENSE" }
s.summary = 'a quick look on all executed network requests performed by netfox'
s.homepage = 'https://github.com/ZXKitCode/netfox-zxkit'
Expand Down
18 changes: 15 additions & 3 deletions pod/zxkit/NetFox+zxkit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ open class NetFoxZXKit: ZXKitPluginProtocol {
}

public func start() {
NFX.sharedInstance().show()
ZXKit.hide()
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
if !self.isRunning {
NFX.sharedInstance().start()
}
NFX.sharedInstance().show()
}
}

public var pluginIdentifier: String {
Expand All @@ -52,11 +58,17 @@ open class NetFoxZXKit: ZXKitPluginProtocol {
}

public var isRunning: Bool {
return true
return NFX.sharedInstance().isStarted()
}

public func stop() {
NFX.sharedInstance().hide()
ZXKit.hide()
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
if !self.isRunning {
NFX.sharedInstance().start()
}
NFX.sharedInstance().show()
}
}


Expand Down

0 comments on commit d5840ae

Please sign in to comment.