Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions Sources/FluidStack/Helper/UIViewController+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,23 @@ extension UIViewController {
func propagateStackAction(_ action: FluidStackAction) {

func _propagateRecursively(viewController: UIViewController) {

guard (viewController is FluidStackController) == false else {

if let stackController = viewController as? FluidStackController {

for handler in stackController.fluidStackActionHandlers {
handler(action)
}

stackController.topViewController?.propagateStackAction(action)

return
}

// call all of handlers
viewController.fluidStackActionHandlers.forEach {
$0(action)
for handler in viewController.fluidStackActionHandlers {
handler(action)
}

// propagates to children
for viewController in viewController.children {
// recursive
Expand Down