Skip to content

Commit

Permalink
refactor(ios): address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
sgtcoolguy committed Dec 11, 2020
1 parent 51b6428 commit c94e6a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion iphone/Classes/TiUIClipboardProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ - (bool)hasURLs
- (void)setItems:(NSDictionary<NSString *, id> *)args
{
NSArray<NSDictionary<NSString *, id> *> *items = args[@"items"];
__block NSMutableArray<NSDictionary<NSString *, id> *> *result = [[[NSMutableArray alloc] init] retain];
__block NSMutableArray<NSDictionary<NSString *, id> *> *result = [[NSMutableArray alloc] init];
// The key of the items must be a string (mime-type)
for (NSDictionary<NSString *, id> *item in items) {
NSMutableDictionary<NSString *, id> *newDict = [[NSMutableDictionary alloc] init];
Expand Down Expand Up @@ -348,9 +348,12 @@ - (void)setItems:(NSDictionary<NSString *, id> *)args
} else if (UTTypeConformsTo((CFStringRef)key, kUTTypeImage)) {
// Convert UIImage to TiBlob!
newItem[key] = [[[TiBlob alloc] initWithImage:(UIImage *)item[key]] autorelease];
} else if ([key hasPrefix:@"dyn."]) {
[newItem removeObjectForKey:key];
}
}
[result addObject:newItem];
[newItem release];
}
},
YES);
Expand Down
2 changes: 1 addition & 1 deletion iphone/Classes/UIModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ - (id)create3DMatrix:(id)args
- (id)Clipboard
{
if (clipboard == nil) {
clipboard = [[[TiUIClipboardProxy alloc] _initWithPageContext:[self executionContext]] retain];
clipboard = [[TiUIClipboardProxy alloc] _initWithPageContext:[self executionContext]];
}
return clipboard;
}
Expand Down

0 comments on commit c94e6a2

Please sign in to comment.