Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3363284
D4445.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.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 "TemporaryMessageStorage.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
@@ -263,6 +265,16 @@
comm::SQLiteQueryExecutor::initialize(sqliteFilePath);
}
+- (void)moveMessagesToDatabase {
+ TemporaryMessageStorage *temporaryStorage =
+ [[TemporaryMessageStorage alloc] init];
+ NSArray<NSString *> *messages = [temporaryStorage 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
Tue, Nov 26, 1:26 AM (21 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2581885
Default Alt Text
D4445.diff (1 KB)
Attached To
Mode
D4445: Retrieve messages from temporary message storage in AppDelegate
Attached
Detach File
Event Timeline
Log In to Comment