Skip to content

Commit

Permalink
Android RN should use same cache clearing logic as iOS
Browse files Browse the repository at this point in the history
This makes it also call `realm::app::App::clear_cached_apps()`, which
fixes #3668. This also makes it more maintainable by having a single place to
put all cache clearing logic for all RN platforms.
  • Loading branch information
RedBeard0531 committed Jun 8, 2021
1 parent 5b0eabf commit 573142d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ x.x.x Release notes (yyyy-MM-dd)

### Fixed
* A warning to polyfill `crypto.getRandomValues` was triggered prematurely ([#3714](https://github.com/realm/realm-js/issues/3714), since v10.4.0)
* Don't hang when using the network after hot-reloading an RN app. ([#3668](https://github.com/realm/realm-js/issues/3668))

### Compatibility
* MongoDB Realm Cloud.
Expand Down
2 changes: 1 addition & 1 deletion src/android/jsc_override.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ static JSGlobalContextRef create_context(JSContextGroupRef group, JSClassRef glo
swap_function();

// Clear cache from previous instances.
realm::_impl::RealmCoordinator::clear_all_caches();
RJSInvalidateCaches();

RJSInitializeInContext(ctx);
realmContextInjected = true;
Expand Down

0 comments on commit 573142d

Please sign in to comment.