mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 09:08:40 +00:00
some typos
This commit is contained in:
parent
c7c168176d
commit
877ee9a057
2 changed files with 7 additions and 5 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import 'package:twonly/src/views/camera/share_image_editor_view.dart';
|
|||
Map<int, DateTime> 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<Message> messages =
|
||||
await twonlyDB.messagesDao.getAllMessagesPendingDownloading();
|
||||
|
|
@ -378,17 +378,19 @@ Future<void> 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} ");
|
||||
|
|
|
|||
Loading…
Reference in a new issue