mirror of https://github.com/zulip/zulip.git
keyboard_shortcut: Add feedback for N/P shortcut after no more message.
Earlier navigating to the next unread topic or DM with N / P and reaching last unread topic or dm, nothing happened when shortcut was pressed again. This commit changes the behaviour when shortcut reaches the last topic or dm and pressed again. Now it notifies the user that there are no more unread messages. Fixes zulip#27862.
This commit is contained in:
parent
72d46c71fb
commit
d6a2bbc2ef
|
@ -815,6 +815,12 @@ export function narrow_to_next_topic(opts = {}) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!next_narrow) {
|
if (!next_narrow) {
|
||||||
|
feedback_widget.show({
|
||||||
|
populate($container) {
|
||||||
|
$container.text($t({defaultMessage: "You have no more unread topics."}));
|
||||||
|
},
|
||||||
|
title_text: $t({defaultMessage: "You're done!"}),
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -832,6 +838,12 @@ export function narrow_to_next_pm_string(opts = {}) {
|
||||||
const next_direct_message = topic_generator.get_next_unread_pm_string(current_direct_message);
|
const next_direct_message = topic_generator.get_next_unread_pm_string(current_direct_message);
|
||||||
|
|
||||||
if (!next_direct_message) {
|
if (!next_direct_message) {
|
||||||
|
feedback_widget.show({
|
||||||
|
populate($container) {
|
||||||
|
$container.text($t({defaultMessage: "You have no more unread direct messages."}));
|
||||||
|
},
|
||||||
|
title_text: $t({defaultMessage: "You're done!"}),
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue