From 877ee9a057f785d5b1fc06731c946a24cdcdaf1c Mon Sep 17 00:00:00 2001 From: otsmr Date: Fri, 11 Jul 2025 13:51:36 +0200 Subject: [PATCH] some typos --- lib/main.dart | 2 +- lib/src/services/api/media_download.dart | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 4522a8f..27eb16f 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -46,7 +46,7 @@ void main() async { await twonlyDB.messagesDao.handleMediaFilesOlderThan7Days(); await twonlyDB.signalDao.purgeOutDatedPreKeys(); - // purge media files in the background + // Purge media files in the background purgeReceivedMediaFiles(); purgeSendMediaFiles(); diff --git a/lib/src/services/api/media_download.dart b/lib/src/services/api/media_download.dart index 0ba9174..a4066ca 100644 --- a/lib/src/services/api/media_download.dart +++ b/lib/src/services/api/media_download.dart @@ -20,7 +20,7 @@ import 'package:twonly/src/views/camera/share_image_editor_view.dart'; Map downloadStartedForMediaReceived = {}; Future tryDownloadAllMediaFiles({bool force = false}) async { - // this is called when websocket is newly connected, so allow all downloads to be restarted. + // This is called when WebSocket is newly connected, so allow all downloads to be restarted. downloadStartedForMediaReceived = {}; List messages = await twonlyDB.messagesDao.getAllMessagesPendingDownloading(); @@ -378,17 +378,19 @@ Future purgeMediaFiles(Directory directory) async { } } if (message.acknowledgeByServer) { - // preserve images which can be stored by the other person... + // Preserve images which can be stored by the other person... if (content.maxShowTime != gMediaShowInfinite) { canBeDeleted = true; } - // encrypted or upload data can be removed when acknowledgedByServer + // Encrypted or upload data can be removed when acknowledgeByServer if (file.path.contains(".upload") || file.path.contains(".encrypted")) { canBeDeleted = true; } } - } catch (e) {} + } catch (e) { + Log.error(e); + } } if (canBeDeleted) { Log.info("purged media file ${file.path} ");