Skip to content

Commit e71e38f

Browse files
use IsVisibleProperty
1 parent 566ca6d commit e71e38f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/FlowNavigation.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ private async Task<View> Go(bool isHotReload = false)
149149
var nextView = (View?)_services.GetService(targetType) ??
150150
throw new Exception($"View {targetType.Name} not found");
151151

152-
_ = nextView.FadeTo(1);
152+
nextView.IsVisible = true;
153+
_ = nextView.FadeTo(1, 500);
153154

154155
if (_activeView is not null)
155156
{
@@ -169,7 +170,7 @@ private async Task<View> Go(bool isHotReload = false)
169170
}
170171
}
171172

172-
if (!isHotReload) _ = (_activeView?.FadeTo(0));
173+
if (!isHotReload) _ = (_activeView?.FadeTo(0, 500));
173174
Current?.View.ShowView(nextView);
174175

175176
if (nextView is FluidView fluidView)
@@ -213,6 +214,7 @@ private async Task<View> Go(bool isHotReload = false)
213214
}
214215

215216
_activeViewType = targetType;
217+
if (_activeView is not null) _activeView.IsVisible = false;
216218
_activeView = fluidView;
217219
}
218220

0 commit comments

Comments
 (0)