mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 23:25:45 +03:00
fixes to PreferencesStorageService
This commit is contained in:
parent
9042702c09
commit
364f25e22a
1 changed files with 3 additions and 3 deletions
|
@ -6,7 +6,7 @@ namespace Bit.Core.Services
|
||||||
{
|
{
|
||||||
public class PreferencesStorageService : IStorageService
|
public class PreferencesStorageService : IStorageService
|
||||||
{
|
{
|
||||||
private string _keyFormat = "bwPref:{0}";
|
private string _keyFormat = "bwPreferencesStorage:{0}";
|
||||||
|
|
||||||
public Task<T> GetAsync<T>(string key)
|
public Task<T> GetAsync<T>(string key)
|
||||||
{
|
{
|
||||||
|
@ -50,12 +50,12 @@ namespace Bit.Core.Services
|
||||||
|
|
||||||
public Task SaveAsync<T>(string key, T obj)
|
public Task SaveAsync<T>(string key, T obj)
|
||||||
{
|
{
|
||||||
var formattedKey = string.Format(_keyFormat, key);
|
|
||||||
if(obj == null)
|
if(obj == null)
|
||||||
{
|
{
|
||||||
return RemoveAsync(formattedKey);
|
return RemoveAsync(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var formattedKey = string.Format(_keyFormat, key);
|
||||||
var objType = typeof(T);
|
var objType = typeof(T);
|
||||||
if(objType == typeof(string))
|
if(objType == typeof(string))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue