Refactor: Remove GlobalVar and replace with IAppSettings; restructure affected infrastructure, services, and view models for dependency injection.
This commit is contained in:
@@ -51,7 +51,7 @@ public static class MauiProgram {
|
||||
builder.Services.AddSingleton<IAlertService, AlertService>();
|
||||
|
||||
// DI: Settings aus Preferences (Single Source of Truth bleibt Preferences)
|
||||
builder.Services.AddSingleton<IAppSettings, PreferencesAppSettings>();
|
||||
builder.Services.AddSingleton<IAppSettings, AppSettings>();
|
||||
|
||||
// DI: ApiOptions IMMER aus aktuellen Settings erzeugen (nicht beim Start einfrieren)
|
||||
builder.Services.AddTransient(sp => new ApiOptions {
|
||||
|
||||
Reference in New Issue
Block a user