mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
iOS: Only display/respond to valid keyboard shortcuts (#826).
This commit is contained in:
parent
d64c66dd62
commit
52cfb516f0
2 changed files with 20 additions and 0 deletions
|
@ -1941,6 +1941,12 @@ shouldStartLoadWithRequest:(NSURLRequest *)request
|
|||
[requestOperation start];
|
||||
}
|
||||
|
||||
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender {
|
||||
if ([self respondsToSelector:action])
|
||||
return self.noStoryMessage.hidden;
|
||||
return [super canPerformAction:action withSender:sender];
|
||||
}
|
||||
|
||||
# pragma mark
|
||||
# pragma mark Subscribing to blurblog
|
||||
|
||||
|
|
|
@ -1114,6 +1114,20 @@
|
|||
[appDelegate.feedDetailViewController redrawUnreadStory]; // XXX only if successful?
|
||||
}
|
||||
|
||||
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender {
|
||||
if (action == @selector(toggleTextView:) ||
|
||||
action == @selector(scrollPageDown:) ||
|
||||
action == @selector(scrollPageUp:) ||
|
||||
action == @selector(toggleStoryUnread:) ||
|
||||
action == @selector(toggleStorySaved:) ||
|
||||
action == @selector(showOriginalSubview:) ||
|
||||
action == @selector(openShareDialog) ||
|
||||
action == @selector(scrolltoComment)) {
|
||||
return (currentPage.pageIndex >= 0);
|
||||
}
|
||||
return [super canPerformAction:action withSender:sender];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Styles
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue