@@ -27,13 +27,13 @@ public bool RemoveState<TView>()
27
27
public TransitionView Complete ( Type type , IEnumerable < Flow > ? flow = null )
28
28
{
29
29
_activeType = type ;
30
- return FluidAnimationsExtensions . Complete ( this , flow ?? GetBreakpointFlow ( type , ActiveBreakpoint ) ) ;
30
+ return FluidAnimationsExtensions . Complete ( this , flow ?? GetBreakpointFlow ( type ) ) ;
31
31
}
32
32
33
33
public Task < bool > Animate ( Type type , IEnumerable < Flow > ? flow = null )
34
34
{
35
35
_activeType = type ;
36
- return FluidAnimationsExtensions . Animate ( this , flow ?? GetBreakpointFlow ( type , ActiveBreakpoint ) ) ;
36
+ return FluidAnimationsExtensions . Animate ( this , flow ?? GetBreakpointFlow ( type ) ) ;
37
37
}
38
38
39
39
/// <summary>
@@ -71,13 +71,15 @@ public static DataTemplate Build<TFromView, TToView, TTransitionView>(
71
71
} )
72
72
. Complete ( typeof ( TFromView ) ) ;
73
73
74
+ transitionView . OnBreakpointChanged ( ) ;
75
+
74
76
return transitionView ;
75
77
} ) ;
76
78
}
77
79
78
- protected override void OnBreakpointChanged ( BreakPoint breakPoint )
80
+ protected override void OnBreakpointChanged ( )
79
81
{
80
- base . OnBreakpointChanged ( breakPoint ) ;
82
+ base . OnBreakpointChanged ( ) ;
81
83
82
84
_ = Complete ( _activeType ) ;
83
85
}
@@ -93,15 +95,16 @@ private void SetBreakpointFlow(Type type, BreakPoint breakpoint, IEnumerable<Flo
93
95
typeFlows [ ( int ) breakpoint ] = flow ;
94
96
}
95
97
96
- private IEnumerable < Flow > GetBreakpointFlow ( Type type , BreakPoint breakpoint )
98
+ private IEnumerable < Flow > GetBreakpointFlow ( Type type )
97
99
{
98
100
var flowsOnType = _flows [ type ] ;
99
- var i = ( int ) breakpoint ;
101
+ var i = ( int ) FlowNavigation . Current . View . ActiveBreakpoint ;
100
102
var flow = flowsOnType [ i ] ;
101
103
102
104
while ( flow is null && i > 0 )
103
105
flow = flowsOnType [ -- i ] ;
104
106
105
- return flow ?? throw new Exception ( $ "No flow found for { type . Name } at breakpoint { breakpoint } ") ;
107
+ return flow ??
108
+ throw new Exception ( $ "No flow found for { type . Name } at breakpoint { FlowNavigation . Current . View . ActiveBreakpoint } ") ;
106
109
}
107
110
}
0 commit comments