Skip to content

Commit

Permalink
Merge pull request #7096 from cheekiatng/timob-19356
Browse files Browse the repository at this point in the history
[TIMOB-19006] iOS9: Add missing imageData property and fix URL for SearchableItemAttributeSet
  • Loading branch information
cheekiatng committed Aug 31, 2015
2 parents fbb0119 + 2fad60f commit ccecd1a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions iphone/Classes/TiAppiOSSearchableItemAttributeSetProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,15 @@ -(void)applyLoadTimeProperties:(NSDictionary*)props
[_attributes setValue:[TiUtils dateForUTCDate:object] forKey:key];
}else if([urlFieldTypes containsObject:key]){
//Use URL logic to add
[_attributes setValue:[NSURL URLWithString:[object stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]] forKey:key];
[_attributes setValue:[self sanitizeURL:object] forKey:key];
}else{
[_attributes setValue:object forKey:key];
}
}
else {
//Use blob to add
[_attributes setValue:[object data] forKey:key];
}
}
else{
NSLog(@"[ERROR] field %@ is invalid",key);
Expand Down Expand Up @@ -118,7 +122,7 @@ -(void)setContentURL:(id)value
{
ENSURE_SINGLE_ARG(value,NSString);
ENSURE_UI_THREAD(setContentURL,value);
_attributes.contentURL =[NSURL URLWithString:[value stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
_attributes.contentURL = [self sanitizeURL:value];
}

//Optional file URL pointing to a thumbnail image for this item
Expand All @@ -131,7 +135,7 @@ -(void)setThumbnailURL:(id)value
{
ENSURE_SINGLE_ARG(value,NSString);
ENSURE_UI_THREAD(setThumbnailURL,value);
_attributes.thumbnailURL = [NSURL URLWithString:[value stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
_attributes.thumbnailURL = [self sanitizeURL:value];
}

//Optional image data for thumbnail for this item
Expand Down Expand Up @@ -1312,7 +1316,7 @@ -(void)setUrl:(id)value
{
ENSURE_SINGLE_ARG(value,NSString);
ENSURE_UI_THREAD(setUrl,value);
_attributes.URL = [NSURL URLWithString:[value stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
_attributes.URL = [self sanitizeURL:value];;
}

@end
Expand Down

0 comments on commit ccecd1a

Please sign in to comment.