Skip to content

Commit f1b9081

Browse files
committed
refactor(MainApplication): Remove MMKV initialization from MainApplication
- Eliminated the direct initialization of MMKV in MainApplication to prevent race conditions. - Retained MMKVKeyManager for managing encryption key initialization prior to React Native startup, ensuring proper key management.
1 parent e42e32b commit f1b9081

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

android/app/src/main/java/chat/rocket/reactnative/MainApplication.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import chat.rocket.reactnative.networking.SSLPinningTurboPackage;
2929
import chat.rocket.reactnative.storage.MMKVKeyManager;
3030
import chat.rocket.reactnative.storage.SecureStoragePackage;
3131
import chat.rocket.reactnative.notification.CustomPushNotification;
32-
import com.tencent.mmkv.MMKV;
3332

3433
open class MainApplication : Application(), ReactApplication, INotificationsApplication {
3534

@@ -58,9 +57,6 @@ open class MainApplication : Application(), ReactApplication, INotificationsAppl
5857
SoLoader.init(this, OpenSourceMergedSoMapping)
5958
Bugsnag.start(this)
6059

61-
// Initialize MMKV before React Native starts
62-
MMKV.initialize(this)
63-
6460
// Initialize MMKV encryption - reads existing key or generates new one
6561
// Must run before React Native starts to avoid race conditions
6662
MMKVKeyManager.initialize(this)

0 commit comments

Comments
 (0)