Browse Source

remove code

Marino Faggiana 6 years ago
parent
commit
aedd3a69a5
1 changed files with 8 additions and 5 deletions
  1. 8 5
      iOSClient/Library/DropdownMenu/DropdownMenu.swift

+ 8 - 5
iOSClient/Library/DropdownMenu/DropdownMenu.swift

@@ -389,17 +389,20 @@ extension DropdownMenu: UITableViewDelegate {
     }
     
     public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+        /*
         let shouldUpdateSelection = delegate?.dropdownMenu(self, shouldUpdateSelectionAt: indexPath) ?? true
+        
         if displaySelected && shouldUpdateSelection {
             let item = sections[indexPath.section].items[indexPath.row]
             if item.accessoryImage  == nil {
-//                let previousSelectedcell = tableView.cellForRow(at: selectedIndexPath)
-//                previousSelectedcell?.accessoryType = .none
-//                selectedIndexPath = indexPath
-//                let cell = tableView.cellForRow(at: indexPath)
-//                cell?.accessoryType = .checkmark
+                let previousSelectedcell = tableView.cellForRow(at: selectedIndexPath)
+                previousSelectedcell?.accessoryType = .none
+                selectedIndexPath = indexPath
+                let cell = tableView.cellForRow(at: indexPath)
+                cell?.accessoryType = .checkmark
             }
         }
+        */
         tableView.deselectRow(at: indexPath, animated: true)
         hideMenu(isSelectAction: true)
         delegate?.dropdownMenu(self, didSelectRowAt: indexPath)