mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Support input dismissal in controllers that use member search node
This commit is contained in:
@@ -339,6 +339,7 @@ public func channelMembersController(context: AccountContext, peerId: PeerId) ->
|
||||
|
||||
var presentControllerImpl: ((ViewController, Any?) -> Void)?
|
||||
var pushControllerImpl: ((ViewController) -> Void)?
|
||||
var dismissInputImpl: (() -> Void)?
|
||||
|
||||
let actionsDisposable = DisposableSet()
|
||||
|
||||
@@ -506,6 +507,8 @@ public func channelMembersController(context: AccountContext, peerId: PeerId) ->
|
||||
}
|
||||
}, pushController: { c in
|
||||
pushControllerImpl?(c)
|
||||
}, dismissInput: {
|
||||
dismissInputImpl?()
|
||||
})
|
||||
}
|
||||
|
||||
@@ -537,6 +540,9 @@ public func channelMembersController(context: AccountContext, peerId: PeerId) ->
|
||||
(controller.navigationController as? NavigationController)?.pushViewController(c)
|
||||
}
|
||||
}
|
||||
dismissInputImpl = { [weak controller] in
|
||||
controller?.view.endEditing(true)
|
||||
}
|
||||
controller.visibleBottomContentOffsetChanged = { offset in
|
||||
if let loadMoreControl = loadMoreControl, case let .known(value) = offset, value < 40.0 {
|
||||
context.peerChannelMemberCategoriesContextsManager.loadMore(peerId: peerId, control: loadMoreControl)
|
||||
|
||||
Reference in New Issue
Block a user