Mute rendering instead of ingress
Previous approach was to keep muted content from getting inserted. Instead, this version alters it's display. This makes toggling mutes on and off externally much more stable (the display changes but we don't have to rebuild content trees) For now muted content is collapsed to a red "Muted" tombstone w/ a reason.
This commit is contained in:
@@ -93,13 +93,13 @@ impl<'a> ThreadView<'a> {
|
||||
|
||||
let thread = self
|
||||
.threads
|
||||
.notes_holder_mutated(self.ndb, self.note_cache, &txn, root_id, is_muted)
|
||||
.notes_holder_mutated(self.ndb, self.note_cache, &txn, root_id)
|
||||
.get_ptr();
|
||||
|
||||
// TODO(jb55): skip poll if ThreadResult is fresh?
|
||||
|
||||
// poll for new notes and insert them into our existing notes
|
||||
match thread.poll_notes_into_view(&txn, self.ndb, is_muted) {
|
||||
match thread.poll_notes_into_view(&txn, self.ndb) {
|
||||
Ok(action) => {
|
||||
action.process_action(&txn, self.ndb, self.unknown_ids, self.note_cache)
|
||||
}
|
||||
@@ -120,7 +120,7 @@ impl<'a> ThreadView<'a> {
|
||||
self.note_cache,
|
||||
self.img_cache,
|
||||
)
|
||||
.show(ui)
|
||||
.show(ui, is_muted)
|
||||
})
|
||||
.inner
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user