mirror of
https://github.com/bitwarden/android.git
synced 2024-12-27 11:28:28 +03:00
PM-3349 Changed UseMauiApp init so that Android Handlers still get added
This commit is contained in:
parent
efb8763d3c
commit
1dcd3a3daa
3 changed files with 8 additions and 8 deletions
|
@ -32,7 +32,8 @@ namespace Bit.App
|
||||||
#else
|
#else
|
||||||
iOS.Core.Utilities.iOSCoreHelpers.ConfigureMAUIHandlers(handlers);
|
iOS.Core.Utilities.iOSCoreHelpers.ConfigureMAUIHandlers(handlers);
|
||||||
#endif
|
#endif
|
||||||
}
|
},
|
||||||
|
initUseMauiApp: true
|
||||||
).Build();
|
).Build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,14 +10,13 @@ namespace Bit.Core;
|
||||||
|
|
||||||
public static class MauiProgram
|
public static class MauiProgram
|
||||||
{
|
{
|
||||||
public static MauiAppBuilder ConfigureMauiAppBuilder(Action<IEffectsBuilder> customEffectsBuilder, Action<IMauiHandlersCollection> customHandlers)
|
public static MauiAppBuilder ConfigureMauiAppBuilder(Action<IEffectsBuilder> customEffectsBuilder, Action<IMauiHandlersCollection> customHandlers, bool initUseMauiApp = false)
|
||||||
{
|
|
||||||
return ConfigureBaseMauiAppBuilder(customEffectsBuilder, customHandlers)
|
|
||||||
.UseMauiApp<Bit.App.App>();
|
|
||||||
}
|
|
||||||
public static MauiAppBuilder ConfigureBaseMauiAppBuilder(Action<IEffectsBuilder> customEffectsBuilder, Action<IMauiHandlersCollection> customHandlers)
|
|
||||||
{
|
{
|
||||||
var builder = MauiApp.CreateBuilder();
|
var builder = MauiApp.CreateBuilder();
|
||||||
|
if(initUseMauiApp)
|
||||||
|
{
|
||||||
|
builder.UseMauiApp<Bit.App.App>();
|
||||||
|
}
|
||||||
builder
|
builder
|
||||||
.UseMauiCommunityToolkit()
|
.UseMauiCommunityToolkit()
|
||||||
.UseMauiCompatibility()
|
.UseMauiCompatibility()
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace Bit.iOS.Core.Utilities
|
||||||
|
|
||||||
public static void SetupMaui()
|
public static void SetupMaui()
|
||||||
{
|
{
|
||||||
var builder = Bit.Core.MauiProgram.ConfigureBaseMauiAppBuilder(ConfigureMAUIEffects, ConfigureMAUIHandlers)
|
var builder = Bit.Core.MauiProgram.ConfigureMauiAppBuilder(ConfigureMAUIEffects, ConfigureMAUIHandlers)
|
||||||
.UseMauiEmbedding<Application>();
|
.UseMauiEmbedding<Application>();
|
||||||
// Register the Window
|
// Register the Window
|
||||||
builder.Services.Add(new ServiceDescriptor(typeof(UIWindow), UIApplication.SharedApplication.KeyWindow));
|
builder.Services.Add(new ServiceDescriptor(typeof(UIWindow), UIApplication.SharedApplication.KeyWindow));
|
||||||
|
|
Loading…
Reference in a new issue