Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32516487
D5234.1767122248.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D5234.1767122248.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
@@ -15,6 +15,7 @@
#import <reacthermes/HermesExecutorFactory.h>
#import "CommCoreModule.h"
+#import "GlobalDBSingleton.h"
#import "GlobalNetworkSingleton.h"
#import "Logger.h"
#import "MessageOperationsUtilities.h"
@@ -168,7 +169,9 @@
// this callback may be called from inactive state so we need
// to initialize the database
[self attemptDatabaseInitialization];
- comm::ThreadOperations::updateSQLiteUnreadStatus(threadID, false);
+ comm::GlobalDBSingleton::instance.scheduleOrRun([threadID]() mutable {
+ comm::ThreadOperations::updateSQLiteUnreadStatus(threadID, false);
+ });
}
[[UNUserNotificationCenter currentNotificationCenter]
getDeliveredNotificationsWithCompletionHandler:^(
@@ -271,7 +274,9 @@
NSArray<NSString *> *messages = [temporaryStorage readAndClearMessages];
for (NSString *message in messages) {
std::string messageInfos = std::string([message UTF8String]);
- comm::MessageOperationsUtilities::storeMessageInfos(messageInfos);
+ comm::GlobalDBSingleton::instance.scheduleOrRun([messageInfos]() mutable {
+ comm::MessageOperationsUtilities::storeMessageInfos(messageInfos);
+ });
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 30, 7:17 PM (7 h, 11 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5869403
Default Alt Text
D5234.1767122248.diff (1 KB)
Attached To
Mode
D5234: Use GlobalDBSingleton when touching database from the native iOS code.
Attached
Detach File
Event Timeline
Log In to Comment