mirror of
https://github.com/bitwarden/mobile.git
synced 2025-01-11 19:31:50 +01:00
fixes to PreferencesStorageService
This commit is contained in:
parent
9042702c09
commit
364f25e22a
@ -6,7 +6,7 @@ namespace Bit.Core.Services
|
||||
{
|
||||
public class PreferencesStorageService : IStorageService
|
||||
{
|
||||
private string _keyFormat = "bwPref:{0}";
|
||||
private string _keyFormat = "bwPreferencesStorage:{0}";
|
||||
|
||||
public Task<T> GetAsync<T>(string key)
|
||||
{
|
||||
@ -50,12 +50,12 @@ namespace Bit.Core.Services
|
||||
|
||||
public Task SaveAsync<T>(string key, T obj)
|
||||
{
|
||||
var formattedKey = string.Format(_keyFormat, key);
|
||||
if(obj == null)
|
||||
{
|
||||
return RemoveAsync(formattedKey);
|
||||
return RemoveAsync(key);
|
||||
}
|
||||
|
||||
var formattedKey = string.Format(_keyFormat, key);
|
||||
var objType = typeof(T);
|
||||
if(objType == typeof(string))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user