Skip to content

Commit

Permalink
Merge pull request #27 from CookieCookson/master
Browse files Browse the repository at this point in the history
Pass through subtitle into onHomeIconPressed
  • Loading branch information
EddyVerbruggen authored Feb 14, 2017
2 parents 02afe8d + 74311d9 commit d125e06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ios/app/AppDelegate+threedeetouch.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ @implementation AppDelegate (threedeetouch)
- (void)application:(UIApplication *)application performActionForShortcutItem:(UIApplicationShortcutItem *)shortcutItem completionHandler:(void(^)(BOOL succeeded))completionHandler {

NSString* jsFunction = @"ThreeDeeTouch.onHomeIconPressed";
NSString *params = [NSString stringWithFormat:@"{'type':'%@', 'title': '%@'}", shortcutItem.type, shortcutItem.localizedTitle];
NSString *params = [NSString stringWithFormat:@"{'type':'%@', 'title': '%@', 'subtitle': '%@'}", shortcutItem.type, shortcutItem.localizedTitle, shortcutItem.localizedSubtitle];
NSString* result = [NSString stringWithFormat:@"%@(%@)", jsFunction, params];
[self callJavascriptFunctionWhenAvailable:result];
}
Expand Down Expand Up @@ -36,4 +36,4 @@ - (void) callJavascriptFunctionWhenAvailable:(NSString*)function {
- (void)applicationDidBecomeActive:(UIApplication *)application {
}

@end
@end

0 comments on commit d125e06

Please sign in to comment.