mirror of
https://github.com/bitwarden/mobile
synced 2026-01-10 12:33:28 +00:00
Project lib updates and migration (#789)
* Replace 3rd party FAB lib with our own code * merged * merged * WIP * WIP * WIP * WIP * Updated LiteDB * Update ZXing libs to 2.4.1 * Missing semicolon * rename fab style to btn-fab * Revert project guid modified by VSmac
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CsvHelper" Version="15.0.1" />
|
||||
<PackageReference Include="LiteDB" Version="4.1.4" />
|
||||
<PackageReference Include="LiteDB" Version="5.0.4" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||
<PackageReference Include="PCLCrypto" Version="2.0.147" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Bit.Core.Services
|
||||
ContractResolver = new CamelCasePropertyNamesContractResolver()
|
||||
};
|
||||
private readonly string _dbPath;
|
||||
private LiteCollection<JsonItem> _collection;
|
||||
private ILiteCollection<JsonItem> _collection;
|
||||
private Task _initTask;
|
||||
|
||||
public LiteDbStorageService(string dbPath)
|
||||
@@ -36,7 +36,7 @@ namespace Bit.Core.Services
|
||||
{
|
||||
try
|
||||
{
|
||||
var db = new LiteDatabase($"Filename={_dbPath};");
|
||||
var db = new LiteDatabase($"Filename={_dbPath};Upgrade=true;");
|
||||
_collection = db.GetCollection<JsonItem>("json_items");
|
||||
}
|
||||
finally
|
||||
@@ -68,7 +68,7 @@ namespace Bit.Core.Services
|
||||
public async Task RemoveAsync(string key)
|
||||
{
|
||||
await InitAsync();
|
||||
_collection.Delete(i => i.Id == key);
|
||||
_collection.DeleteMany(i => i.Id == key);
|
||||
}
|
||||
|
||||
private class JsonItem
|
||||
|
||||
Reference in New Issue
Block a user