hotkeys: Simplify navigation checks for page up/down.

We remove an unnecessary conditional that always returned true
due to checks that happen earlier in the function.
This commit is contained in:
Steve Howell 2017-03-14 11:32:10 -07:00 committed by showell
parent 58c057a024
commit bdbaa5d386
1 changed files with 4 additions and 10 deletions

View File

@ -524,19 +524,13 @@ exports.process_hotkey = function (e, hotkey) {
case 'page_up':
case 'vim_page_up':
case 'shift_spacebar':
if (!exports.is_settings_page()) {
navigate.page_up();
return true;
}
break;
navigate.page_up();
return true;
case 'page_down':
case 'vim_page_down':
case 'spacebar':
if (!exports.is_settings_page()) {
navigate.page_down();
return true;
}
break;
navigate.page_down();
return true;
}
// Shortcuts that operate on a message