mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 03:06:37 +00:00
Bump the RustSDK to v1.0.79; add a feature flag for the new rust side ClientBuilder::useEventCachePersistentStorage
This commit is contained in:
committed by
Stefan Ceriu
parent
e59a705459
commit
df3e5976ce
@@ -46,7 +46,17 @@ class NotificationServiceExtension: UNNotificationServiceExtension {
|
||||
|
||||
// Used to create one single UserSession across process/instances/runs
|
||||
private static let serialQueue = DispatchQueue(label: "io.element.elementx.nse")
|
||||
private static var userSession: NSEUserSession?
|
||||
|
||||
// Temporary. We need to make sure the NSE and the main app pass in the same value.
|
||||
// The NSE has a tendency of staying alive for longer so use this to manually kill it
|
||||
// when the feature flag doesn't match.
|
||||
private static var eventCacheEnabled = false
|
||||
|
||||
private static var userSession: NSEUserSession? {
|
||||
didSet {
|
||||
eventCacheEnabled = settings.eventCacheEnabled
|
||||
}
|
||||
}
|
||||
|
||||
override func didReceive(_ request: UNNotificationRequest,
|
||||
withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
|
||||
@@ -94,6 +104,11 @@ class NotificationServiceExtension: UNNotificationServiceExtension {
|
||||
return discard(unreadCount: request.unreadCount)
|
||||
}
|
||||
}
|
||||
|
||||
guard Self.eventCacheEnabled == settings.eventCacheEnabled else {
|
||||
MXLog.error("Found missmatch `eventCacheEnabled` feature flag missmatch, restarting the NSE.")
|
||||
exit(0)
|
||||
}
|
||||
|
||||
Task {
|
||||
await run(with: credentials,
|
||||
|
||||
Reference in New Issue
Block a user