Page MenuHomePhabricator

D4573.diff
No OneTemporary

D4573.diff

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
@@ -168,6 +168,7 @@
[self attemptDatabaseInitialization];
comm::ThreadOperations::updateSQLiteUnreadStatus(threadID, false);
}
+ dispatch_semaphore_t rescind_completed_sema = dispatch_semaphore_create(0);
[[UNUserNotificationCenter currentNotificationCenter]
getDeliveredNotificationsWithCompletionHandler:^(
NSArray<UNNotification *> *notifications) {
@@ -180,10 +181,10 @@
removeDeliveredNotificationsWithIdentifiers:identifiers];
}
}
- dispatch_async(dispatch_get_main_queue(), ^{
- completionHandler(UIBackgroundFetchResultNewData);
- });
+ dispatch_semaphore_signal(rescind_completed_sema);
}];
+ dispatch_semaphore_wait(rescind_completed_sema, DISPATCH_TIME_FOREVER);
+ completionHandler(UIBackgroundFetchResultNewData);
return YES;
}
return NO;

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 11, 4:58 AM (20 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2859919
Default Alt Text
D4573.diff (1 KB)

Event Timeline