Skip to content

Commit 367f777

Browse files
committed
ios [nfc]: Rename ZLPNotificationsStatus class, from just ZLPNotifications
We're about to add a new class to the same file.
1 parent 4bc7ecc commit 367f777

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

ios/ZulipMobile/ZLPNotifications.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import Foundation
22
import UIKit
33
import React.RCTBridgeModule
44

5-
@objc(ZLPNotifications)
6-
class ZLPNotifications: NSObject {
5+
@objc(ZLPNotificationsStatus)
6+
class ZLPNotificationsStatus: NSObject {
77
/// Whether the app can receive remote notifications.
88
// Ideally we could subscribe to changes in this value, but there
99
// doesn't seem to be an API for that. The caller can poll, e.g., by

ios/ZulipMobile/ZLPNotificationsBridge.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#import "React/RCTBridgeModule.h"
22

3-
// Register the ZLPNotifications implementation with React Native, needed
4-
// because ZLPNotifications is in Swift:
3+
// Register the ZLPNotificationsStatus implementation with React Native
4+
// needed because ZLPNotificationsStatus is in Swift:
55
// https://reactnative.dev/docs/0.68/native-modules-ios#exporting-swift
6-
@interface RCT_EXTERN_MODULE(ZLPNotifications, NSObject)
6+
@interface RCT_EXTERN_MODULE(ZLPNotificationsStatus, NSObject)
77

88
RCT_EXTERN_METHOD(areNotificationsAuthorized:
99
(RCTPromiseResolveBlock) resolve

src/settings/NotifTroubleshootingScreen.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import { Role } from '../api/permissionsTypes';
4848

4949
const {
5050
Notifications, // android
51-
ZLPNotifications, // ios
51+
ZLPNotificationsStatus, // ios
5252
} = NativeModules;
5353

5454
type Props = $ReadOnly<{|
@@ -92,7 +92,7 @@ function useNativeState() {
9292
(async () => {
9393
const systemSettingsEnabled: boolean = await (Platform.OS === 'android'
9494
? Notifications.areNotificationsEnabled()
95-
: ZLPNotifications.areNotificationsAuthorized());
95+
: ZLPNotificationsStatus.areNotificationsAuthorized());
9696
setResult(r => ({ ...r, systemSettingsEnabled }));
9797
})();
9898

0 commit comments

Comments
 (0)