Browse Source

Update NCContextMenu.swift

Marino Faggiana 1 năm trước cách đây
mục cha
commit
226756942c
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 6 1
      iOSClient/Menu/NCContextMenu.swift

+ 6 - 1
iOSClient/Menu/NCContextMenu.swift

@@ -151,7 +151,12 @@ class NCContextMenu: NSObject {
 
         let deleteConfirmFile = UIAction(title: titleDeleteConfirmFile,
                                          image: UIImage(systemName: "trash"), attributes: .destructive) { _ in
-            let alertController = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
+
+            var alertStyle = UIAlertController.Style.actionSheet
+            if UIDevice.current.userInterfaceIdiom == .pad {
+                alertStyle = .alert
+            }
+            let alertController = UIAlertController(title: nil, message: nil, preferredStyle: alertStyle)
             alertController.addAction(UIAlertAction(title: NSLocalizedString("_delete_file_", comment: ""), style: .destructive) { _ in
                 Task {
                     var ocId: [String] = []