refactor: Removes the behavior of deleting an event if the file is no longer cached

This brings more problems than it
helps. It leads to bugs like flickering
of sending images and also
confuses the user. This should
either be handled by the app
or the user.
This commit is contained in:
Krille 2024-05-06 14:59:45 +02:00
parent 7637f9b65c
commit bf5bf2adb0
No known key found for this signature in database
GPG Key ID: E067ECD60F1A0652
1 changed files with 0 additions and 13 deletions

View File

@ -145,19 +145,6 @@ class Event extends MatrixEvent {
);
}
}
// If this is failed to send and the file is no longer cached, it should be removed!
if (!status.isSent &&
{
MessageTypes.Image,
MessageTypes.Video,
MessageTypes.Audio,
MessageTypes.File,
}.contains(messageType) &&
!room.sendingFilePlaceholders.containsKey(eventId)) {
// ignore: discarded_futures
remove();
}
}
static Map<String, dynamic> getMapFromPayload(Object? payload) {