mirror of
https://github.com/bitwarden/mobile.git
synced 2024-11-27 12:26:31 +01:00
EC-833 fix WatchDeviceService registration to be called from the extensions appropiately (#2233)
This commit is contained in:
parent
1a3ff5ec41
commit
28d204f2b1
@ -404,6 +404,7 @@ namespace Bit.iOS.Autofill
|
||||
ServiceContainer.Init(deviceActionService.DeviceUserAgent,
|
||||
Bit.Core.Constants.iOSAutoFillClearCiphersCacheKey, Bit.Core.Constants.iOSAllClearCipherCacheKeys);
|
||||
iOSCoreHelpers.InitLogger();
|
||||
iOSCoreHelpers.RegisterFinallyBeforeBootstrap();
|
||||
iOSCoreHelpers.Bootstrap();
|
||||
var appOptions = new AppOptions { IosExtension = true };
|
||||
var app = new App.App(appOptions);
|
||||
|
@ -49,10 +49,7 @@ namespace Bit.iOS.Core.Utilities
|
||||
Bit.Core.Constants.iOSAllClearCipherCacheKeys);
|
||||
InitLogger();
|
||||
|
||||
ServiceContainer.Register<IWatchDeviceService>(new WatchDeviceService(ServiceContainer.Resolve<ICipherService>(),
|
||||
ServiceContainer.Resolve<IEnvironmentService>(),
|
||||
ServiceContainer.Resolve<IStateService>(),
|
||||
ServiceContainer.Resolve<IVaultTimeoutService>()));
|
||||
RegisterFinallyBeforeBootstrap();
|
||||
|
||||
Bootstrap();
|
||||
|
||||
@ -139,6 +136,14 @@ namespace Bit.iOS.Core.Utilities
|
||||
ServiceContainer.Register<IAvatarImageSourcePool>("avatarImageSourcePool", new AvatarImageSourcePool());
|
||||
}
|
||||
|
||||
public static void RegisterFinallyBeforeBootstrap()
|
||||
{
|
||||
ServiceContainer.Register<IWatchDeviceService>(new WatchDeviceService(ServiceContainer.Resolve<ICipherService>(),
|
||||
ServiceContainer.Resolve<IEnvironmentService>(),
|
||||
ServiceContainer.Resolve<IStateService>(),
|
||||
ServiceContainer.Resolve<IVaultTimeoutService>()));
|
||||
}
|
||||
|
||||
public static void Bootstrap(Func<Task> postBootstrapFunc = null)
|
||||
{
|
||||
(ServiceContainer.Resolve<II18nService>("i18nService") as MobileI18nService).Init();
|
||||
|
@ -408,6 +408,7 @@ namespace Bit.iOS.Extension
|
||||
ServiceContainer.Init(deviceActionService.DeviceUserAgent,
|
||||
Bit.Core.Constants.iOSExtensionClearCiphersCacheKey, Bit.Core.Constants.iOSAllClearCipherCacheKeys);
|
||||
iOSCoreHelpers.InitLogger();
|
||||
iOSCoreHelpers.RegisterFinallyBeforeBootstrap();
|
||||
iOSCoreHelpers.Bootstrap();
|
||||
var app = new App.App(new AppOptions { IosExtension = true });
|
||||
ThemeManager.SetTheme(app.Resources);
|
||||
|
@ -306,11 +306,7 @@ namespace Bit.iOS
|
||||
ServiceContainer.Init(deviceActionService.DeviceUserAgent, Constants.ClearCiphersCacheKey,
|
||||
Constants.iOSAllClearCipherCacheKeys);
|
||||
iOSCoreHelpers.InitLogger();
|
||||
|
||||
ServiceContainer.Register<IWatchDeviceService>(new WatchDeviceService(ServiceContainer.Resolve<ICipherService>(),
|
||||
ServiceContainer.Resolve<IEnvironmentService>(),
|
||||
ServiceContainer.Resolve<IStateService>(),
|
||||
ServiceContainer.Resolve<IVaultTimeoutService>()));
|
||||
iOSCoreHelpers.RegisterFinallyBeforeBootstrap();
|
||||
|
||||
_pushHandler = new iOSPushNotificationHandler(
|
||||
ServiceContainer.Resolve<IPushNotificationListenerService>("pushNotificationListenerService"));
|
||||
|
Loading…
Reference in New Issue
Block a user