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:
@@ -58,20 +58,14 @@ impl<'a> ProfileView<'a> {
|
||||
}
|
||||
let profile = self
|
||||
.profiles
|
||||
.notes_holder_mutated(
|
||||
self.ndb,
|
||||
self.note_cache,
|
||||
&txn,
|
||||
self.pubkey.bytes(),
|
||||
is_muted,
|
||||
)
|
||||
.notes_holder_mutated(self.ndb, self.note_cache, &txn, self.pubkey.bytes())
|
||||
.get_ptr();
|
||||
|
||||
profile.timeline.selected_view =
|
||||
tabs_ui(ui, profile.timeline.selected_view, &profile.timeline.views);
|
||||
|
||||
// poll for new notes and insert them into our existing notes
|
||||
if let Err(e) = profile.poll_notes_into_view(&txn, self.ndb, is_muted) {
|
||||
if let Err(e) = profile.poll_notes_into_view(&txn, self.ndb) {
|
||||
error!("Profile::poll_notes_into_view: {e}");
|
||||
}
|
||||
|
||||
@@ -86,7 +80,7 @@ impl<'a> ProfileView<'a> {
|
||||
self.note_cache,
|
||||
self.img_cache,
|
||||
)
|
||||
.show(ui)
|
||||
.show(ui, is_muted)
|
||||
})
|
||||
.inner
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user