Avoid unneeded call to can_apply_locally().

The "if" condition that was removed in this commit
is no longer needed, since the called code now
handles the cannot-apply-locally use case.  (We
wanted the called functions to be defensive, so
they already were effectively handling the conditions
anyway, and recent commits has them returning
appropriate values and doing the right things.)
This commit is contained in:
Steve Howell
2018-05-31 15:21:00 +00:00
committed by Tim Abbott
parent 7642ed66cf
commit d0ad6295fa

View File

@@ -162,14 +162,12 @@ exports.activate = function (raw_operators, opts) {
// Populate the message list if we can apply our filter locally (i.e.
// with no backend help) and we have the message we want to select.
if (narrow_state.get_current_filter().can_apply_locally()) {
// We may get back a new select_strategy, or we may get our
// original back.
select_strategy = exports.maybe_add_local_messages({
select_strategy: select_strategy,
msg_data: msg_data,
});
}
// We may get back a new select_strategy, or we may get our
// original back.
select_strategy = exports.maybe_add_local_messages({
select_strategy: select_strategy,
msg_data: msg_data,
});
var msg_list = new message_list.MessageList({
data: msg_data,