booker преди 5 години
родител
ревизия
3dbee48382
променени са 2 файла, в които са добавени 7 реда и са изтрити 5 реда
  1. 0
    2
      ios/RNPermissions.h
  2. 7
    3
      ios/RNPermissions.m

+ 0
- 2
ios/RNPermissions.h Целия файл

@@ -79,8 +79,6 @@ typedef enum {
79 79
 
80 80
 @interface RNPermissions : NSObject <RCTBridgeModule>
81 81
 
82
-@property (nonatomic, strong) NSMutableDictionary<NSString *, id<RNPermissionHandler>>  *_Nonnull handlers;
83
-
84 82
 + (bool)isFlaggedAsRequested:(NSString * _Nonnull)handlerId;
85 83
 
86 84
 + (void)flagAsRequested:(NSString * _Nonnull)handlerId;

+ 7
- 3
ios/RNPermissions.m Целия файл

@@ -104,6 +104,10 @@ RCT_ENUM_CONVERTER(RNPermission, (@{
104 104
 
105 105
 @end
106 106
 
107
+@interface RNPermissions ()
108
+@property (nonatomic, strong) NSMutableDictionary<NSString *, id<RNPermissionHandler>>  *_Nonnull handlers;
109
+@end
110
+
107 111
 @implementation RNPermissions
108 112
 
109 113
 RCT_EXPORT_MODULE();
@@ -226,13 +230,13 @@ RCT_EXPORT_MODULE();
226 230
 }
227 231
 
228 232
 - (NSString *)insertHandler:(id<RNPermissionHandler>)handler {
229
-    if( self.handlers == nil){
230
-        self.handlers = [NSMutableDictionary new];
233
+    if(_handlers == nil){
234
+        _handlers = [NSMutableDictionary new];
231 235
     }
232 236
     
233 237
     NSString *randomId = [[NSUUID UUID] UUIDString];
234 238
     
235
-    [self.handlers setObject:handler forKey:randomId];
239
+    [_handlers setObject:handler forKey:randomId];
236 240
     
237 241
     return randomId;
238 242
 }