Skip to content

Commit 3dbee48

Browse files
bookerbooker
authored andcommitted
Make handlers private
1 parent c02d876 commit 3dbee48

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

ios/RNPermissions.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ typedef enum {
7979

8080
@interface RNPermissions : NSObject <RCTBridgeModule>
8181

82-
@property (nonatomic, strong) NSMutableDictionary<NSString *, id<RNPermissionHandler>> *_Nonnull handlers;
83-
8482
+ (bool)isFlaggedAsRequested:(NSString * _Nonnull)handlerId;
8583

8684
+ (void)flagAsRequested:(NSString * _Nonnull)handlerId;

ios/RNPermissions.m

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ @implementation RCTConvert(RNPermission)
104104

105105
@end
106106

107+
@interface RNPermissions ()
108+
@property (nonatomic, strong) NSMutableDictionary<NSString *, id<RNPermissionHandler>> *_Nonnull handlers;
109+
@end
110+
107111
@implementation RNPermissions
108112

109113
RCT_EXPORT_MODULE();
@@ -226,13 +230,13 @@ - (NSString *)stringForStatus:(RNPermissionStatus)status {
226230
}
227231

228232
- (NSString *)insertHandler:(id<RNPermissionHandler>)handler {
229-
if( self.handlers == nil){
230-
self.handlers = [NSMutableDictionary new];
233+
if(_handlers == nil){
234+
_handlers = [NSMutableDictionary new];
231235
}
232236

233237
NSString *randomId = [[NSUUID UUID] UUIDString];
234238

235-
[self.handlers setObject:handler forKey:randomId];
239+
[_handlers setObject:handler forKey:randomId];
236240

237241
return randomId;
238242
}

0 commit comments

Comments
 (0)