Force re-render of a note

This commit is contained in:
Mike Dilger 2023-04-14 05:39:35 +12:00
parent b95cfa88ad
commit f10616cd7d
2 changed files with 3 additions and 2 deletions

View File

@ -373,6 +373,9 @@ fn render_note_inner(
.send(ToOverlordMessage::DeletePost(note.event.id)); .send(ToOverlordMessage::DeletePost(note.event.id));
} }
} }
if ui.button("Rerender").clicked() {
app.notes.cache_invalidate_note(&note.event.id);
}
}); });
ui.add_space(4.0); ui.add_space(4.0);

View File

@ -212,12 +212,10 @@ impl Notes {
} }
*/ */
/*
/// Drop NoteData for a specific note /// Drop NoteData for a specific note
pub(super) fn cache_invalidate_note(&mut self, id: &Id) { pub(super) fn cache_invalidate_note(&mut self, id: &Id) {
self.notes.remove(id); self.notes.remove(id);
} }
*/
/// Drop all NoteData for a given person /// Drop all NoteData for a given person
pub(in crate::ui) fn cache_invalidate_person(&mut self, pubkey: &PublicKeyHex) { pub(in crate::ui) fn cache_invalidate_person(&mut self, pubkey: &PublicKeyHex) {