mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 09:28:41 +00:00
fix #191
This commit is contained in:
parent
87d7f24416
commit
511e304f20
3 changed files with 13 additions and 34 deletions
33
README.md
33
README.md
|
|
@ -1,34 +1,3 @@
|
||||||
# twonly
|
# twonly
|
||||||
|
|
||||||
Don't be lonely, get twonly! Send pictures to a friend in real time and be sure you are the only two people who can see them.
|
run-as eu.twonly.testing ls /data/user/0/eu.twonly.testing/
|
||||||
|
|
||||||
run-as eu.twonly.testing ls /data/user/0/eu.twonly.testing/
|
|
||||||
|
|
||||||
|
|
||||||
## Pro Version
|
|
||||||
|
|
||||||
- Send and receive unlimited pictures
|
|
||||||
- This includes a free pro version for your twonly partner!
|
|
||||||
- Get up to 3 tokens
|
|
||||||
- Get for your twonly partner a second a additional pro version
|
|
||||||
|
|
||||||
## Features
|
|
||||||
|
|
||||||
This app was started because of the three main features I missed out by popular alternatives.
|
|
||||||
|
|
||||||
|
|
||||||
## Background Notification
|
|
||||||
|
|
||||||
The server will first try to send via an open websocket connection.
|
|
||||||
If not available then it sends a wakeup via FCM. This will trigger the app to reopen the websocket.
|
|
||||||
|
|
||||||
### Three to rule them all.
|
|
||||||
|
|
||||||
1. Security by design: No one except your device can access your data.
|
|
||||||
2. Privacy by design: The server only knows your username and public key.
|
|
||||||
3. User-friendliness: Decide for your own :)
|
|
||||||
|
|
||||||
## Bug-Bounty
|
|
||||||
|
|
||||||
twonly offers a Bug Bounty. Depending on the criticality the bounty can go up to 50€ (more later,
|
|
||||||
this is out of my own pocket :/).
|
|
||||||
|
|
@ -306,9 +306,13 @@ Future<void> purgeMediaFiles(Directory directory) async {
|
||||||
bool canBeDeleted = true;
|
bool canBeDeleted = true;
|
||||||
|
|
||||||
for (final message in messages) {
|
for (final message in messages) {
|
||||||
if ((message.openedAt == null && !message.errorWhileSending) ||
|
if ((message.openedAt == null && !message.errorWhileSending)) {
|
||||||
message.mediaStored) {
|
|
||||||
canBeDeleted = false;
|
canBeDeleted = false;
|
||||||
|
} else if (message.mediaStored) {
|
||||||
|
if (!file.path.contains(".original.") &&
|
||||||
|
!file.path.contains(".encrypted")) {
|
||||||
|
canBeDeleted = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (canBeDeleted) {
|
if (canBeDeleted) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
import 'package:drift/drift.dart';
|
||||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:twonly/src/model/json/message.dart';
|
import 'package:twonly/src/model/json/message.dart';
|
||||||
|
|
@ -48,6 +49,11 @@ class GalleryItem {
|
||||||
} else if (await File("$basePath.png").exists()) {
|
} else if (await File("$basePath.png").exists()) {
|
||||||
imagePath = File("$basePath.png");
|
imagePath = File("$basePath.png");
|
||||||
} else {
|
} else {
|
||||||
|
if (message.mediaStored) {
|
||||||
|
/// media file was deleted, ... remove the file
|
||||||
|
twonlyDatabase.messagesDao.updateMessageByMessageId(
|
||||||
|
message.messageId, MessagesCompanion(mediaStored: Value(false)));
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
bool mirrorVideo = false;
|
bool mirrorVideo = false;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue