wip
This commit is contained in:
parent
2caa14abf2
commit
a738415763
|
@ -39,17 +39,13 @@
|
||||||
namespace realm {
|
namespace realm {
|
||||||
namespace js {
|
namespace js {
|
||||||
|
|
||||||
static bool config_fs_done = false;
|
|
||||||
|
|
||||||
realm::SyncManager& syncManagerShared() {
|
realm::SyncManager& syncManagerShared() {
|
||||||
realm::SyncManager& shared = SyncManager::shared();
|
static bool configured = []{
|
||||||
if (!config_fs_done) {
|
|
||||||
// setup synced realmFile paths
|
|
||||||
ensure_directory_exists_for_file(default_realm_file_directory());
|
ensure_directory_exists_for_file(default_realm_file_directory());
|
||||||
shared.configure_file_system(default_realm_file_directory(), SyncManager::MetadataMode::NoEncryption);
|
SyncManager::shared().configure_file_system(default_realm_file_directory(), SyncManager::MetadataMode::NoEncryption);
|
||||||
config_fs_done = true;
|
return true;
|
||||||
}
|
}();
|
||||||
return shared;
|
return SyncManager::shared();
|
||||||
}
|
}
|
||||||
|
|
||||||
using SharedUser = std::shared_ptr<realm::SyncUser>;
|
using SharedUser = std::shared_ptr<realm::SyncUser>;
|
||||||
|
|
Loading…
Reference in New Issue