1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-21 10:43:22 +00:00

only clear cache if it hasnt been done in a while

This commit is contained in:
Kyle Spearrin
2017-07-13 11:11:04 -04:00
parent 352c8ee867
commit e0c67f87b0
6 changed files with 43 additions and 1 deletions

View File

@@ -8,6 +8,13 @@ namespace Bit.iOS.Services
{
public class DeviceActionService : IDeviceActionService
{
private readonly IAppSettingsService _appSettingsService;
public DeviceActionService(IAppSettingsService appSettingsService)
{
_appSettingsService = appSettingsService;
}
public void CopyToClipboard(string text)
{
UIPasteboard clipboard = UIPasteboard.General;
@@ -44,6 +51,8 @@ namespace Bit.iOS.Services
NSFileManager.DefaultManager.Remove(item, out itemError);
}
}
_appSettingsService.LastCacheClear = DateTime.UtcNow;
}
private UIViewController GetVisibleViewController(UIViewController controller = null)