// Because we use the current wavelet version to mark a blip as read, and
// because the wavelet version can change independently of that blip, the
// mark-blip-as-read action is not idempotent. Therefore, to minimise
// chatter, we do it only for unread blips.
if (isUnread(b)) {
Blip raw = b.hackGetRaw();
Wavelet wavelet = raw.getWavelet();
supplement.markBlipAsRead(wavelet.getId(), raw.getId(),
// It is possible that during a VersionUpdateOperatin, the blip version is updated
// before the wavelet version is updated, hence the max.
// TODO(user, zdwang) to remove this once the wave model does correct event boundaries.
(int) Math.max(raw.getLastModifiedVersion(), wavelet.getVersion()));
}
}