fix: Hide redacted stories

This commit is contained in:
Christian Pauly 2022-03-13 10:58:39 +01:00
parent 85c1710ae3
commit 5c3b9be9c1

View File

@ -294,6 +294,7 @@ class StoryPageController extends State<StoryPage> {
future: event.redactEvent,
);
setState(() {
events.remove(event);
_modalOpened = false;
});
}
@ -395,8 +396,9 @@ class StoryPageController extends State<StoryPage> {
}
final timeline = this.timeline = await room.getTimeline();
timeline.requestKeys();
var events =
timeline.events.where((e) => e.type == EventTypes.Message).toList();
var events = timeline.events
.where((e) => e.type == EventTypes.Message && !e.redacted)
.toList();
final hasOutdatedEvents = events.removeOutdatedEvents();