feat: allow resigning current NSUserActivity (#18659)

* feat: allow resigning current NSUserActivity

* wrap in @available check
This commit is contained in:
Shelley Vohr 2019-06-06 22:16:03 -07:00 committed by GitHub
parent b30484d3a9
commit abab90f563
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 23 additions and 4 deletions

View file

@ -93,6 +93,13 @@ inline void dispatch_sync_main(dispatch_block_t block) {
}
}
- (void)resignCurrentActivity {
if (@available(macOS 10.11, *)) {
if (currentActivity_)
[currentActivity_ resignCurrent];
}
}
- (void)updateCurrentActivity:(NSString*)type
withUserInfo:(NSDictionary*)userInfo {
if (currentActivity_) {