mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
resolve some todos
This commit is contained in:
parent
046f25c223
commit
4d54c8f1d1
7 changed files with 11 additions and 26 deletions
|
@ -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();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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
|
||||
}
|
||||
{ }
|
||||
}
|
||||
|
|
|
@ -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<bool> _lockedCallback;
|
||||
|
||||
public LockService(
|
||||
ICryptoService cryptoService,
|
||||
|
@ -26,7 +26,8 @@ namespace Bit.Core.Services
|
|||
ICipherService cipherService,
|
||||
ICollectionService collectionService,
|
||||
ISearchService searchService,
|
||||
IMessagingService messagingService)
|
||||
IMessagingService messagingService,
|
||||
Action<bool> 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)
|
||||
|
|
|
@ -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"));
|
||||
|
|
Loading…
Reference in a new issue