1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-26 12:16:07 +01:00

resolve some todos

This commit is contained in:
Kyle Spearrin 2019-06-05 08:58:11 -04:00
parent 046f25c223
commit 4d54c8f1d1
7 changed files with 11 additions and 26 deletions

View File

@ -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();
});
}

View File

@ -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;
}
}

View File

@ -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; }

View File

@ -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)
{

View File

@ -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
}
{ }
}

View File

@ -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)

View File

@ -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"));