Skip to content

Commit c62402d

Browse files
committed
ZLPNotifications [nfc]: Remove trivial constantsToExport
Since the module doesn't have any constants to export. If it wants to export any, we can always add the method back. Also remove `requiresMainQueueSetup`, which (according to the linked doc) was needed because we were implementing `constantsToExport`. On my iPhone 13 Pro running iOS 16.1, the feature supported by this module (alerting the user when Zulip notifications are disabled at the system level) still works as expected.
1 parent 2250a68 commit c62402d

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

ios/ZulipMobile/ZLPNotifications.swift

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,6 @@ import React.RCTBridgeModule
44

55
@objc(ZLPNotifications)
66
class ZLPNotifications: NSObject {
7-
// For why we include this, see
8-
// https://reactnative.dev/docs/0.68/native-modules-ios#exporting-constants
9-
@objc
10-
static func requiresMainQueueSetup() -> Bool {
11-
// Initialization may be done on any thread; we don't need access to
12-
// UIKit.
13-
return false
14-
}
15-
167
/// Whether the app can receive remote notifications.
178
// Ideally we could subscribe to changes in this value, but there
189
// doesn't seem to be an API for that. The caller can poll, e.g., by
@@ -28,9 +19,4 @@ class ZLPNotifications: NSObject {
2819
resolve(settings.authorizationStatus == UNAuthorizationStatus.authorized)
2920
})
3021
}
31-
32-
@objc
33-
func constantsToExport() -> [String: Any]! {
34-
return [:]
35-
}
3622
}

0 commit comments

Comments
 (0)