removeEvent method
Implementation
@override
Future<void> removeEvent(String eventId, String roomId) async {
await _eventsBox.delete(MultiKey(roomId, eventId).toString());
for (final key in _timelineFragmentsBox.keys) {
final multiKey = MultiKey.fromString(key);
if (multiKey.parts.first != roomId) continue;
final List eventIds = await _timelineFragmentsBox.get(key) ?? [];
final prevLength = eventIds.length;
eventIds.removeWhere((id) => id == eventId);
if (eventIds.length < prevLength) {
await _timelineFragmentsBox.put(key, eventIds);
}
}
return;
}