Hero icon indicating copy to clipboard operation
Hero copied to clipboard

HeroModifiers will fail when a nested `when` modifier exist

Open cloxnu opened this issue 1 year ago • 0 comments

view.heroModifiers = [
    .when({ $0.isMatched && $0.matchedView?.alpha != 0 && $0.view.alpha != 0 }, [
        .forceNonFade,
        .when({ ($0.isAppearing && $0.isPresenting || !$0.isAppearing && !$0.isPresenting) }, .opacity(0)),
    ]),
]

Look at this, .opacity(0) will never be added.

cloxnu avatar Mar 02 '23 06:03 cloxnu