1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-15 07:43:37 +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

@@ -11,6 +11,13 @@ namespace Bit.Android.Services
{
public class DeviceActionService : IDeviceActionService
{
private readonly IAppSettingsService _appSettingsService;
public DeviceActionService(IAppSettingsService appSettingsService)
{
_appSettingsService = appSettingsService;
}
public void CopyToClipboard(string text)
{
var clipboardManager = (ClipboardManager)Forms.Context.GetSystemService(Context.ClipboardService);
@@ -86,6 +93,7 @@ namespace Bit.Android.Services
try
{
DeleteDir(CrossCurrentActivity.Current.Activity.CacheDir);
_appSettingsService.LastCacheClear = DateTime.UtcNow;
}
catch(Exception) { }
}