Skip to content

Commit

Permalink
Try to build android
Browse files Browse the repository at this point in the history
  • Loading branch information
nirinchev committed May 13, 2019
1 parent 0e6f7cd commit 697bbe6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Realm/Realm/Configurations/SyncConfigurationBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,14 @@ internal override async Task<Realm> CreateRealmAsync(RealmSchema schema)
// Keep that until we open the Realm on the foreground.
var backgroundHandle = await SharedRealmHandleExtensions.OpenWithSyncAsync(configuration, ToNative(), schema, EncryptionKey);

var srHandle = SharedRealmHandleExtensions.OpenWithSync(configuration, ToNative(), schema, EncryptionKey);
var foregroundHandle = SharedRealmHandleExtensions.OpenWithSync(configuration, ToNative(), schema, EncryptionKey);
backgroundHandle.Close();
if (IsDynamic && !schema.Any())
{
srHandle.GetSchema(nativeSchema => schema = RealmSchema.CreateFromObjectStoreSchema(nativeSchema));
foregroundHandle.GetSchema(nativeSchema => schema = RealmSchema.CreateFromObjectStoreSchema(nativeSchema));
}

return new Realm(srHandle, this, schema);
return new Realm(foregroundHandle, this, schema);
}

internal Native.SyncConfiguration ToNative()
Expand Down
11 changes: 5 additions & 6 deletions wrappers/src/subscription_cs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,11 @@ REALM_EXPORT Subscription* realm_subscription_create(Results& results, uint16_t*

auto inclusion_paths = realm::generate_include_from_keypaths(paths, *results.get_realm(), results.get_object_schema(), mapping);

realm::partial_sync::SubscriptionOptions options {
name,
optional_ttl,
update,
inclusion_paths
};
realm::partial_sync::SubscriptionOptions options;
options.user_provided_name = name;
options.time_to_live_ms = optional_ttl;
options.update = update;
options.inclusions = inclusion_paths;

auto result = realm::partial_sync::subscribe(results, options);
return new Subscription(std::move(result));
Expand Down

0 comments on commit 697bbe6

Please sign in to comment.