Revert "hotkey: Add hotkey to narrow to starred messages."

This reverts commit 144d21494e.
This commit is contained in:
Tim Abbott 2018-08-13 15:05:36 -07:00
parent a0929b6937
commit 62bee26ea7
4 changed files with 3 additions and 27 deletions

View File

@ -70,13 +70,12 @@ run_test('mappings', () => {
});
}
function map_down(which, shiftKey, ctrlKey, metaKey, altKey) {
function map_down(which, shiftKey, ctrlKey, metaKey) {
return hotkey.get_keydown_hotkey({
which: which,
shiftKey: shiftKey,
ctrlKey: ctrlKey,
metaKey: metaKey,
altKey: altKey,
});
}
@ -125,7 +124,6 @@ run_test('mappings', () => {
assert.equal(map_down(75, true, true), undefined); // shift + ctrl + k
assert.equal(map_down(83, true, true), undefined); // shift + ctrl + s
assert.equal(map_down(219, true, true, false), undefined); // shift + ctrl + [
assert.equal(map_down(83, false, false, false, true), undefined); // alt + s
// CMD tests for MacOS
global.navigator.userAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36";
@ -137,8 +135,6 @@ run_test('mappings', () => {
assert.equal(map_down(83, false, true, false), undefined); // ctrl + s
// Reset userAgent
global.navigator.userAgent = '';
assert.equal(map_down(83, false, true, false, true).name, 'narrow_starred'); // ctrl + alt + s
});
run_test('basic_chars', () => {

View File

@ -111,23 +111,13 @@ var keypress_mappings = {
120: {name: 'compose_private_message', message_view_only: true}, // 'x'
};
var keydown_ctrl_alt_mappings = {
83: {name: 'narrow_starred', message_view_only: true}, // 's'
};
exports.get_keydown_hotkey = function (e) {
var hotkey;
if (e.altKey) {
if (e.ctrlKey) {
hotkey = keydown_ctrl_alt_mappings[e.which];
if (hotkey) {
return hotkey;
}
}
return;
}
var hotkey;
if (e.ctrlKey && !e.shiftKey) {
hotkey = keydown_ctrl_mappings[e.which];
if (hotkey) {
@ -636,10 +626,6 @@ exports.process_hotkey = function (e, hotkey) {
return do_narrow_action(function (target, opts) {
narrow.by('is', 'private', opts);
});
case 'narrow_starred':
return do_narrow_action(function (target, opts) {
narrow.by('is', 'starred', opts);
});
case 'query_streams':
stream_list.initiate_search();
return true;

View File

@ -170,10 +170,6 @@
<td class="hotkey">P</td>
<td class="definition">{% trans %}Narrow to all private messages{% endtrans %}</td>
</tr>
<tr>
<td class="hotkey">Ctrl + Alt + s</td>
<td class="definition">{% trans %}Narrow to starred messages{% endtrans %}</td>
</tr>
<tr>
<td class="hotkey">n</td>
<td class="definition">{% trans %}Narrow to next unread topic{% endtrans %}</td>

View File

@ -76,8 +76,6 @@ below, and add more to your repertoire as needed.
* **Narrow to all private messages**: `P`
* **Narrow to starred messages**: `Ctrl + Alt + s`
* **Cycle between stream narrows**: `A` (previous) and `D` (next)
* **Narrow to all messages**: `Esc` or `Ctrl` + `[` — Shows all unmuted messages.