Skip to content

Commit

Permalink
Fixed warning of incompatible return type in app delegate
Browse files Browse the repository at this point in the history
  • Loading branch information
charliescheer committed Apr 11, 2024
1 parent aabd303 commit 5dad3d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Simplenote/SimplenoteAppDelegate+Swift.swift
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,13 @@ extension SimplenoteAppDelegate {
}

@objc
func handleUserActivity(_ userActivity: NSUserActivity) {
func handleUserActivity(_ userActivity: NSUserActivity) -> Bool {
if userActivity.activityType == "com.apple.corespotlightitem" {
presentNote(for: userActivity)
return
return true
}

return false
}

func presentNote(for userActivity: NSUserActivity) {
Expand Down
2 changes: 1 addition & 1 deletion Simplenote/SimplenoteAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ - (IBAction)aboutAction:(id)sender

- (BOOL)application:(NSApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<NSUserActivityRestoring>> * _Nonnull))restorationHandler
{
[self handleUserActivity:userActivity];
return [self handleUserActivity:userActivity];
}

#pragma mark - Simperium Delegates
Expand Down

0 comments on commit 5dad3d3

Please sign in to comment.