resignFirstResponder on settings search

This commit is contained in:
Kylmakalle 2025-07-09 14:45:35 +03:00
parent fe28c9d96d
commit 135f92af1b

View File

@ -212,10 +212,12 @@ public enum SGItemListUIEntry<Section: SGItemListSection, BoolSetting: Hashable,
case let .oneFromManySelector(_, _, settingName, text, value, enabled):
return ItemListDisclosureItem(presentationData: presentationData, title: text, enabled: enabled, label: value, sectionId: self.section, style: .blocks, action: {
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil) // Closing search keyboard if active
arguments.setOneFromManyValue(settingName)
})
case let .action(_, _, actionType, text, kind):
return ItemListActionItem(presentationData: presentationData, title: text, kind: kind, alignment: .natural, sectionId: self.section, style: .blocks, action: {
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil) // Closing search keyboard if active
arguments.action(actionType)
})
case let .searchInput(_, _, title, text, placeholder):