1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-12-19 15:48:21 +01:00

lock on app restart

This commit is contained in:
Kyle Spearrin 2019-06-03 12:30:26 -04:00
parent c27e44a7d2
commit 8211f85725
4 changed files with 26 additions and 0 deletions

View File

@ -39,6 +39,7 @@ namespace Bit.App.Pages
new KeyValuePair<string, int?>(AppResources.LockOption30Minutes, 30), new KeyValuePair<string, int?>(AppResources.LockOption30Minutes, 30),
new KeyValuePair<string, int?>(AppResources.LockOption1Hour, 60), new KeyValuePair<string, int?>(AppResources.LockOption1Hour, 60),
new KeyValuePair<string, int?>(AppResources.LockOption4Hours, 240), new KeyValuePair<string, int?>(AppResources.LockOption4Hours, 240),
new KeyValuePair<string, int?>(AppResources.LockOptionOnRestart, -1),
new KeyValuePair<string, int?>(AppResources.Never, null), new KeyValuePair<string, int?>(AppResources.Never, null),
}; };

View File

@ -2256,6 +2256,24 @@ namespace Bit.App.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to On Device Lock.
/// </summary>
public static string LockOptionOnDeviceLock {
get {
return ResourceManager.GetString("LockOptionOnDeviceLock", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to On App Restart.
/// </summary>
public static string LockOptionOnRestart {
get {
return ResourceManager.GetString("LockOptionOnRestart", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Lock Options. /// Looks up a localized string similar to Lock Options.
/// </summary> /// </summary>

View File

@ -1592,4 +1592,10 @@
<data name="DisableSavePromptDescription" xml:space="preserve"> <data name="DisableSavePromptDescription" xml:space="preserve">
<value>The "Save Prompt" automatically prompts you to save new items to your vault whenever you enter them for the first time.</value> <value>The "Save Prompt" automatically prompts you to save new items to your vault whenever you enter them for the first time.</value>
</data> </data>
<data name="LockOptionOnDeviceLock" xml:space="preserve">
<value>On Device Lock</value>
</data>
<data name="LockOptionOnRestart" xml:space="preserve">
<value>On App Restart</value>
</data>
</root> </root>

View File

@ -121,6 +121,7 @@ namespace Bit.App.Utilities
if(lastBuild == null) if(lastBuild == null)
{ {
// Installed // Installed
await storageService.SaveAsync(Constants.LockOptionKey, -1);
} }
else if(lastBuild != currentBuild) else if(lastBuild != currentBuild)
{ {