mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 10:38:41 +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.messagesDao.handleMediaFilesOlderThan7Days();
|
||||||
await twonlyDB.signalDao.purgeOutDatedPreKeys();
|
await twonlyDB.signalDao.purgeOutDatedPreKeys();
|
||||||
|
|
||||||
// purge media files in the background
|
// Purge media files in the background
|
||||||
purgeReceivedMediaFiles();
|
purgeReceivedMediaFiles();
|
||||||
purgeSendMediaFiles();
|
purgeSendMediaFiles();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import 'package:twonly/src/views/camera/share_image_editor_view.dart';
|
||||||
Map<int, DateTime> downloadStartedForMediaReceived = {};
|
Map<int, DateTime> downloadStartedForMediaReceived = {};
|
||||||
|
|
||||||
Future tryDownloadAllMediaFiles({bool force = false}) async {
|
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 = {};
|
downloadStartedForMediaReceived = {};
|
||||||
List<Message> messages =
|
List<Message> messages =
|
||||||
await twonlyDB.messagesDao.getAllMessagesPendingDownloading();
|
await twonlyDB.messagesDao.getAllMessagesPendingDownloading();
|
||||||
|
|
@ -378,17 +378,19 @@ Future<void> purgeMediaFiles(Directory directory) async {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (message.acknowledgeByServer) {
|
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) {
|
if (content.maxShowTime != gMediaShowInfinite) {
|
||||||
canBeDeleted = true;
|
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") ||
|
if (file.path.contains(".upload") ||
|
||||||
file.path.contains(".encrypted")) {
|
file.path.contains(".encrypted")) {
|
||||||
canBeDeleted = true;
|
canBeDeleted = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {}
|
} catch (e) {
|
||||||
|
Log.error(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (canBeDeleted) {
|
if (canBeDeleted) {
|
||||||
Log.info("purged media file ${file.path} ");
|
Log.info("purged media file ${file.path} ");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue