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