mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
Extract mark_summarized().
(imported from commit 14a1c69392ec6ca8cb0ec72196368a195dd4c6fa)
This commit is contained in:
@@ -5,17 +5,21 @@ var summary = (function () {
|
||||
|
||||
var exports = {};
|
||||
|
||||
function mark_summarized(message) {
|
||||
if (narrow.narrowed_by_reply()) {
|
||||
// Narrowed to a topic or PM recipient
|
||||
send_summarize_in_stream(message);
|
||||
}
|
||||
|
||||
if (narrow.active() && !narrow.narrowed_to_search()) {
|
||||
// Narrowed to anything except a search
|
||||
send_summarize_in_home(message);
|
||||
}
|
||||
}
|
||||
|
||||
exports.maybe_mark_summarized = function (message) {
|
||||
if (feature_flags.summarize_read_while_narrowed) {
|
||||
if (narrow.narrowed_by_reply()) {
|
||||
// Narrowed to a topic or PM recipient
|
||||
send_summarize_in_stream(message);
|
||||
}
|
||||
|
||||
if (narrow.active() && !narrow.narrowed_to_search()) {
|
||||
// Narrowed to anything except a search
|
||||
send_summarize_in_home(message);
|
||||
}
|
||||
mark_summarized(message);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user