Compare commits
No commits in common. "404bba56ab0d1399094b71e4316143d576422b99" and "bcd72e17d896dc61f465950dba8b8a8090ae0323" have entirely different histories.
404bba56ab
...
bcd72e17d8
4 changed files with 17 additions and 28 deletions
15
CHANGELOG.md
15
CHANGELOG.md
|
|
@ -18,21 +18,6 @@ pour la production des paquets `.deb`.
|
|||
|
||||
## [1.0.8-rc1] - unstable
|
||||
|
||||
### Added
|
||||
|
||||
* a code cleanup
|
||||
* a failling a disabled test ala Xamarin.UITest : the Android app stil doesn't starts
|
||||
|
||||
### Changed
|
||||
|
||||
moslty nothing
|
||||
|
||||
### Fixed
|
||||
|
||||
nothing
|
||||
|
||||
## [1.0.8-rc1] - unstable
|
||||
|
||||
### Added
|
||||
- `BlogAclApiTests.PostCircleAuthorization_returns_201_when_payload_mirrors_PostIt_shape_against_existing_circle_named_test`
|
||||
: test de non-régression qui épingle la forme exacte du payload
|
||||
|
|
|
|||
|
|
@ -65,10 +65,7 @@ public partial class App : Application
|
|||
singleViewPlatform.MainView = CreateMainWindow();
|
||||
ApplyDarkMode(settings);
|
||||
}
|
||||
var mainVm = ServiceProvider!.GetRequiredService<HomePageViewModel>();
|
||||
|
||||
base.OnFrameworkInitializationCompleted();
|
||||
this.PushPageAsync(mainVm).Wait();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -89,6 +86,9 @@ public partial class App : Application
|
|||
PushMainPageAsync().Wait();
|
||||
};
|
||||
|
||||
var homeVm = ServiceProvider!.GetRequiredService<HomePageViewModel>();
|
||||
|
||||
this.PushPageAsync(homeVm).Wait();
|
||||
Window.SessionBanner.DataContext = sessionStatus;
|
||||
return Window;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,12 @@ namespace PostIt;
|
|||
Url = "https://docs.avaloniaui.net/docs/concepts/view-locator")]
|
||||
public class ViewLocator : IDataTemplate
|
||||
{
|
||||
private readonly IServiceProvider _services;
|
||||
|
||||
public ViewLocator(IServiceProvider services)
|
||||
{
|
||||
_services = services;
|
||||
}
|
||||
|
||||
public Control Build(object? data)
|
||||
{
|
||||
|
|
@ -32,17 +38,15 @@ public class ViewLocator : IDataTemplate
|
|||
|
||||
private Control BuildCore(object? data)
|
||||
{
|
||||
var app = App.Current as App;
|
||||
var services = app!.ServiceProvider!;
|
||||
return data switch
|
||||
{
|
||||
MainViewModel => services.GetRequiredService<MainPage>(),
|
||||
Settings => services.GetRequiredService<SettingsPage>(),
|
||||
HomePageViewModel => services.GetRequiredService<HomePage>(),
|
||||
SignaturePageViewModel => services.GetRequiredService<SignaturePage>(),
|
||||
AddCircleMemberDialogViewModel => services.GetRequiredService<AddCircleMemberDialog>(),
|
||||
CirclesPageViewModel => services.GetRequiredService<CirclesPage>(),
|
||||
PostAclDialogViewModel => services.GetRequiredService<PostAclDialog>(),
|
||||
MainViewModel => _services.GetRequiredService<MainPage>(),
|
||||
Settings => _services.GetRequiredService<SettingsPage>(),
|
||||
HomePageViewModel => _services.GetRequiredService<HomePage>(),
|
||||
SignaturePageViewModel => _services.GetRequiredService<SignaturePage>(),
|
||||
AddCircleMemberDialogViewModel => _services.GetRequiredService<AddCircleMemberDialog>(),
|
||||
CirclesPageViewModel => _services.GetRequiredService<CirclesPage>(),
|
||||
PostAclDialogViewModel => _services.GetRequiredService<PostAclDialog>(),
|
||||
null => new TextBlock { Text = "No view for <null>" },
|
||||
_ => new TextBlock { Text = $"No view for {data.GetType().Name}" }
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue