mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 23:25:45 +03:00
task.run init
This commit is contained in:
parent
fb50123af0
commit
1b613db534
1 changed files with 2 additions and 5 deletions
|
@ -32,21 +32,18 @@ namespace Bit.Core.Services
|
||||||
{
|
{
|
||||||
return _initTask;
|
return _initTask;
|
||||||
}
|
}
|
||||||
Task doTask()
|
_initTask = Task.Run(() =>
|
||||||
{
|
{
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var db = new LiteDatabase($"Filename={_dbPath};");
|
var db = new LiteDatabase($"Filename={_dbPath};");
|
||||||
_collection = db.GetCollection<JsonItem>("json_items");
|
_collection = db.GetCollection<JsonItem>("json_items");
|
||||||
return Task.FromResult(0);
|
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
_initTask = null;
|
_initTask = null;
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
_initTask = doTask();
|
|
||||||
return _initTask;
|
return _initTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue