@@ -2,11 +2,11 @@ import AppKit
22import Foundation
33
44protocol ActionFactory {
5- static func createAction( for tag: SubMenuItems . Tags , device: Device , itemName: String ) -> Action
5+ static func createAction( for tag: SubMenuItems . Tags , device: Device , itemName: String , skipConfirmation : Bool ) -> Action
66}
77
88class AndroidActionFactory : ActionFactory {
9- static func createAction( for tag: SubMenuItems . Tags , device: Device , itemName: String ) -> any Action {
9+ static func createAction( for tag: SubMenuItems . Tags , device: Device , itemName: String , skipConfirmation : Bool = false ) -> any Action {
1010 switch tag {
1111 case . copyName:
1212 return CopyNameAction ( device: device)
@@ -21,7 +21,7 @@ class AndroidActionFactory: ActionFactory {
2121 case . paste:
2222 return PasteClipboardAction ( device: device)
2323 case . delete:
24- return DeleteAction ( device: device)
24+ return DeleteAction ( device: device, skipConfirmation : skipConfirmation )
2525 case . customCommand:
2626 return CustomCommandAction ( device: device, itemName: itemName)
2727 case . logcat:
@@ -31,7 +31,7 @@ class AndroidActionFactory: ActionFactory {
3131}
3232
3333class IOSActionFactory : ActionFactory {
34- static func createAction( for tag: SubMenuItems . Tags , device: Device , itemName: String ) -> any Action {
34+ static func createAction( for tag: SubMenuItems . Tags , device: Device , itemName: String , skipConfirmation : Bool = false ) -> any Action {
3535 switch tag {
3636 case . copyName:
3737 return CopyNameAction ( device: device)
@@ -42,7 +42,7 @@ class IOSActionFactory: ActionFactory {
4242 case . coldBoot:
4343 return ColdBootCommand ( device: device)
4444 case . delete:
45- return DeleteAction ( device: device)
45+ return DeleteAction ( device: device, skipConfirmation : skipConfirmation )
4646 default :
4747 fatalError ( " Unhandled action tag: \( tag) " )
4848 }
0 commit comments