mirror of
https://gitlab.com/mysocialportal/relatica
synced 2024-10-18 12:23:31 +00:00
Change ObjectBox inserts to use queued instead of async
This commit is contained in:
parent
b68e9a999e
commit
0d70a95606
1 changed files with 4 additions and 2 deletions
|
@ -95,8 +95,10 @@ class ObjectBoxConnectionsRepo implements IConnectionsRepo {
|
|||
bool upsertConnection(Connection connection) {
|
||||
memCache.upsertConnection(connection);
|
||||
getById(connection.id).match(
|
||||
onSuccess: (existing) => box.put(connection.copy(obId: existing.obId)),
|
||||
onError: (_) => box.put(connection),
|
||||
onSuccess: (existing) => box.putQueued(
|
||||
connection.copy(obId: existing.obId),
|
||||
),
|
||||
onError: (_) => box.putQueued(connection),
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue