refactor: Upstream calls to set_message_booleans.

We want to call `set_message_booleans` as soon as we
get data from the server, to avoid confusion about whether
`flags` is the authoritative field.

This commit has callers to `add_message_metadata` call
`set_message_booleans`.

This also sets us up to **not** call `set_message_booleans`
in the local echo codepath, where we can just have the
markdown processor set booleans natively.
This commit is contained in:
Steve Howell
2017-12-16 17:05:32 -05:00
committed by showell
parent e96b3ffc5a
commit 4d8d17d134
4 changed files with 5 additions and 2 deletions

View File

@@ -23,6 +23,7 @@ function process_result(messages, opts) {
narrow.show_empty_narrow_message();
}
_.each(messages, message_store.set_message_booleans);
messages = _.map(messages, message_store.add_message_metadata);
// If we're loading more messages into the home view, save them to