Skip to content

Commit

Permalink
👌 Add screenCapture to DebugView.Event enum
Browse files Browse the repository at this point in the history
  • Loading branch information
iujames authored and mmaatttt committed Apr 11, 2023
1 parent 60867dc commit 8418bf9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import UIKit
@available(iOS 13.0, *)
internal protocol DebugViewDelegate: AnyObject {
func debugView(did event: DebugView.Event)
func screenCaptured()
}

@available(iOS 13.0, *)
Expand Down Expand Up @@ -251,7 +250,7 @@ internal class DebugView: UIView, FloatingViewDelegate {
fleetingLogView.clear()
case .screenCapture:
// this is where we'll initiate the screen capture and pass back to the DebugViewDelegate
delegate?.screenCaptured()
delegate?.debugView(did: .screenCapture)
}
}

Expand Down Expand Up @@ -471,5 +470,6 @@ extension DebugView {
case open
case close
case reposition
case screenCapture
}
}
7 changes: 1 addition & 6 deletions Sources/AppcuesKit/Presentation/Debugger/UIDebugger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,10 @@ extension UIDebugger: DebugViewDelegate {
hide()
case .open:
viewModel.ping()
case .show, .close, .reposition:
case .show, .close, .reposition, .screenCapture:
break
}
}

func screenCaptured() {
// any post processing and network activity for a captured screen will go here
}

}

@available(iOS 13.0, *)
Expand Down

0 comments on commit 8418bf9

Please sign in to comment.