kopia lustrzana https://gitlab.com/mysocialportal/relatica
Fix ObjectBox Connection upsert keying off DB ID not Fediverse ID
rodzic
2423dfbddf
commit
35ffbd7273
|
@ -94,7 +94,10 @@ class ObjectBoxConnectionsRepo implements IConnectionsRepo {
|
|||
@override
|
||||
bool upsertConnection(Connection connection) {
|
||||
memCache.upsertConnection(connection);
|
||||
box.put(connection);
|
||||
getById(connection.id).match(
|
||||
onSuccess: (existing) => box.put(connection.copy(obId: existing.obId)),
|
||||
onError: (_) => box.put(connection),
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue