diff --git a/src/App/App.xaml.cs b/src/App/App.xaml.cs index d9e29dfe8..eb8fd6520 100644 --- a/src/App/App.xaml.cs +++ b/src/App/App.xaml.cs @@ -110,10 +110,6 @@ namespace Bit.App // Clean up old migrated key if they ever log out. await _secureStorageService.RemoveAsync("oldKey"); } - else if(message.Command == "unlocked" || message.Command == "loggedIn") - { - // TODO - } else if(message.Command == "resumed") { if(Device.RuntimePlatform == Device.iOS) @@ -195,10 +191,6 @@ namespace Bit.App _searchService.ClearIndex(); _authService.LogOut(() => { - if(expired) - { - // TODO: Toast? - } Current.MainPage = new HomePage(); }); } diff --git a/src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs b/src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs index e41dd1976..27598928d 100644 --- a/src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs +++ b/src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs @@ -61,8 +61,7 @@ namespace Bit.App.Pages _fingerprintName = AppResources.Fingerprint; if(Device.RuntimePlatform == Device.iOS) { - _fingerprintName = AppResources.TouchID; - // TODO: face id + _fingerprintName = _deviceActionService.SupportsFaceId() ? AppResources.FaceID : AppResources.TouchID; } } diff --git a/src/Core/Models/Request/DeviceRequest.cs b/src/Core/Models/Request/DeviceRequest.cs index ecc9bf90c..a4cd687bb 100644 --- a/src/Core/Models/Request/DeviceRequest.cs +++ b/src/Core/Models/Request/DeviceRequest.cs @@ -10,7 +10,6 @@ namespace Bit.Core.Models.Request Type = platformUtilsService.GetDevice(); Name = platformUtilsService.GetDeviceString(); Identifier = appId; - PushToken = null; // TODO? } public DeviceType? Type { get; set; } diff --git a/src/Core/Models/Request/TokenRequest.cs b/src/Core/Models/Request/TokenRequest.cs index 7a51f9e79..072f549cc 100644 --- a/src/Core/Models/Request/TokenRequest.cs +++ b/src/Core/Models/Request/TokenRequest.cs @@ -29,8 +29,7 @@ namespace Bit.Core.Models.Request obj.Add("deviceType", ((int)Device.Type).ToString()); obj.Add("deviceIdentifier", Device.Identifier); obj.Add("deviceName", Device.Name); - // TODO - // dict.Add("devicePushToken", null); + obj.Add("devicePushToken", Device.PushToken); } if(!string.IsNullOrWhiteSpace(Token) && Provider != null) { diff --git a/src/Core/Models/View/View.cs b/src/Core/Models/View/View.cs index eaaed0f91..719e9ad74 100644 --- a/src/Core/Models/View/View.cs +++ b/src/Core/Models/View/View.cs @@ -1,11 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Bit.Core.Models.View +namespace Bit.Core.Models.View { public abstract class View - { - // TODO - } + { } } diff --git a/src/Core/Services/LockService.cs b/src/Core/Services/LockService.cs index 007af23f0..a264a24bf 100644 --- a/src/Core/Services/LockService.cs +++ b/src/Core/Services/LockService.cs @@ -1,5 +1,4 @@ using Bit.Core.Abstractions; -using Bit.Core.Utilities; using System; using System.Threading.Tasks; @@ -16,6 +15,7 @@ namespace Bit.Core.Services private readonly ICollectionService _collectionService; private readonly ISearchService _searchService; private readonly IMessagingService _messagingService; + private readonly Action _lockedCallback; public LockService( ICryptoService cryptoService, @@ -26,7 +26,8 @@ namespace Bit.Core.Services ICipherService cipherService, ICollectionService collectionService, ISearchService searchService, - IMessagingService messagingService) + IMessagingService messagingService, + Action lockedCallback) { _cryptoService = cryptoService; _userService = userService; @@ -37,6 +38,7 @@ namespace Bit.Core.Services _collectionService = collectionService; _searchService = searchService; _messagingService = messagingService; + _lockedCallback = lockedCallback; } public bool PinLocked { get; set; } @@ -118,7 +120,7 @@ namespace Bit.Core.Services if(FingerprintLocked || PinLocked) { _messagingService.Send("locked", userInitiated); - // TODO: locked callback? + _lockedCallback?.Invoke(userInitiated); return; } } @@ -133,7 +135,7 @@ namespace Bit.Core.Services _collectionService.ClearCache(); _searchService.ClearIndex(); _messagingService.Send("locked", userInitiated); - // TODO: locked callback? + _lockedCallback?.Invoke(userInitiated); } public async Task SetLockOptionAsync(int? lockOption) diff --git a/src/Core/Utilities/ServiceContainer.cs b/src/Core/Utilities/ServiceContainer.cs index 2c1392866..0b5669d1d 100644 --- a/src/Core/Utilities/ServiceContainer.cs +++ b/src/Core/Utilities/ServiceContainer.cs @@ -42,7 +42,7 @@ namespace Bit.Core.Utilities var collectionService = new CollectionService(cryptoService, userService, storageService, i18nService); searchService = new SearchService(cipherService); var lockService = new LockService(cryptoService, userService, platformUtilsService, storageService, - folderService, cipherService, collectionService, searchService, messagingService); + folderService, cipherService, collectionService, searchService, messagingService, null); var syncService = new SyncService(userService, apiService, settingsService, folderService, cipherService, cryptoService, collectionService, storageService, messagingService, () => messagingService.Send("logout"));