• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zulip / zulip-mobile / 3419
47%

Build:
DEFAULT BRANCH: master
Ran 06 Sep 2018 05:35PM UTC
Jobs 1
Files 363
Run time 32s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
3419

push

travis-ci

gnprice
webview render: Refer to state.flags instead of message.flags.

This is part of fixing #2676.  As discussed in the PR thread #2843,
the `flags` property on a message object in our Redux store never
changes after we first receive the message, and instead we maintain an
updated version under the separate top-level state subtree `flags`;
but we've been using the message object's stale `flags` for rendering
the message in the message list.

This change switches to using the up-to-date flags from `state.flags`,
via the `getFlags` selector, instead.  Now when the user stars or
unstars a message, we still don't yet update the message list (that's
for a followup commit); but now at least the next message list we
render from scratch will reflect the update.

In making this change, we get a bit of a head start because we already
invoke `getFlags` to populate the `flags` prop of `MessageList` (in
its `connect` call), which gets passed down to `renderMessagesAsHtml`.
So we just need to use it there, and adapt the layers underneath to
take the different data format found in `state.flags`.

Of the two spots where we actually use `flags` in message rendering:

 * `messageTagsAsHtml` gets a bit simpler; it only needs to know
   whether or not the message is starred, so we just pass it a boolean
   for that.

 * `messageDiv` actually uses the flags as a list of strings (for now)
   to generate HTML data-* attributes, so we make a little helper
   function for it to just compute that list.

[greg: explained more context in commit message]

1014 of 2103 branches covered (48.22%)

Branch coverage included in aggregate %.

1954 of 3792 relevant lines covered (51.53%)

43.95 hits per line

Jobs
ID Job ID Ran Files Coverage
1 3419.1 (COVERALLS_REPO_TOKEN=4eYQDtWoBJlDz2QkxoQ2UcnmJFcOB7zkv) 06 Sep 2018 05:35PM UTC 0
50.35
Travis Job 3419.1
Source Files on build 3419
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #3419
  • 13c1e611 on github
  • Prev Build on master (#6794)
  • Next Build on master (#6801)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc