Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3560212
D4445.id14263.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D4445.id14263.diff
View Options
diff --git a/native/ios/Comm/AppDelegate.mm b/native/ios/Comm/AppDelegate.mm
--- a/native/ios/Comm/AppDelegate.mm
+++ b/native/ios/Comm/AppDelegate.mm
@@ -17,8 +17,10 @@
#import "CommCoreModule.h"
#import "GlobalNetworkSingleton.h"
#import "Logger.h"
+#import "MessageOperationsUtilities.h"
#import "NetworkModule.h"
#import "SQLiteQueryExecutor.h"
+#import "TemporalMessageStorage.h"
#import "ThreadOperations.h"
#import "Tools.h"
#import <cstdio>
@@ -75,7 +77,7 @@
#ifdef FB_SONARKIT_ENABLED
InitializeFlipper(application);
#endif
-
+ [self moveMessagesToDatabase];
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self
launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
@@ -261,6 +263,16 @@
comm::SQLiteQueryExecutor::initialize(sqliteFilePath);
}
+- (void)moveMessagesToDatabase {
+ TemporalMessageStorage *temporalStorage =
+ [[TemporalMessageStorage alloc] init];
+ NSArray<NSString *> *messages = [temporalStorage readAndClearMessages];
+ for (NSString *message in messages) {
+ std::string messageInfos = std::string([message UTF8String]);
+ comm::MessageOperationsUtilities::storeMessageInfos(messageInfos);
+ }
+}
+
// Copied from
// ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/OnLoad.cpp
static ::hermes::vm::RuntimeConfig
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 28, 7:12 AM (3 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2724578
Default Alt Text
D4445.id14263.diff (1 KB)
Attached To
Mode
D4445: Retrieve messages from temporary message storage in AppDelegate
Attached
Detach File
Event Timeline
Log In to Comment