Skip to content

Commit

Permalink
fix: Initialize not registering ViewModelFactory (#307)
Browse files Browse the repository at this point in the history
  • Loading branch information
RLittlesII authored Dec 28, 2020
1 parent 08d71c5 commit 88b7f0e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Sextant.XamForms/SextantHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ public static NavigationView Initialize<TViewModel>(IScheduler? mainThreadSchedu
var bgScheduler = mainThreadScheduler ?? RxApp.TaskpoolScheduler;
var mScheduler = backgroundScheduler ?? RxApp.MainThreadScheduler;
var vLocator = viewLocator ?? Locator.Current.GetService<IViewLocator>();
Locator.CurrentMutable.RegisterViewModelFactory();
var viewFactory = Locator.Current.GetService<IViewModelFactory>();

var navigationView = new NavigationView(mScheduler, bgScheduler, vLocator);
var viewStackService = new ViewStackService(navigationView);
var viewStackService = new ViewStackService(navigationView, viewFactory);

Locator.CurrentMutable.Register<IViewStackService>(() => viewStackService);

Expand Down

0 comments on commit 88b7f0e

Please sign in to comment.