mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 07:48:40 +00:00
fix smaller issues
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run
This commit is contained in:
parent
6b353d8a66
commit
e97f0a910f
5 changed files with 25 additions and 26 deletions
|
|
@ -224,13 +224,9 @@ Future<void> downloadFileFast(
|
|||
|
||||
Future<void> requestMediaReupload(String mediaId) async {
|
||||
final messages = await twonlyDB.messagesDao.getMessagesByMediaId(mediaId);
|
||||
if (messages.length != 1 || messages.first.senderId == null) {
|
||||
Log.error(
|
||||
'Media file has none or more than one sender. That is not possible',
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
for (final message in messages) {
|
||||
if (message.openedAt != null) continue;
|
||||
await sendCipherText(
|
||||
messages.first.senderId!,
|
||||
EncryptedContent(
|
||||
|
|
@ -240,13 +236,13 @@ Future<void> requestMediaReupload(String mediaId) async {
|
|||
),
|
||||
),
|
||||
);
|
||||
|
||||
await twonlyDB.mediaFilesDao.updateMedia(
|
||||
mediaId,
|
||||
const MediaFilesCompanion(
|
||||
downloadState: Value(DownloadState.reuploadRequested),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> handleEncryptedFile(String mediaId) async {
|
||||
|
|
|
|||
|
|
@ -50,8 +50,10 @@ Future<(Uint8List, Uint8List?)?> tryToSendCompleteMessage({
|
|||
}
|
||||
receiptId = receipt.receiptId;
|
||||
|
||||
if (!onlyReturnEncryptedData && receipt.ackByServerAt != null) {
|
||||
Log.error('message already uploaded!');
|
||||
if (!onlyReturnEncryptedData &&
|
||||
receipt.ackByServerAt != null &&
|
||||
receipt.markForRetry == null) {
|
||||
Log.error('Message already uploaded and mark for retry is not set!');
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -141,6 +143,7 @@ Future<(Uint8List, Uint8List?)?> tryToSendCompleteMessage({
|
|||
ackByServerAt: Value(DateTime.now()),
|
||||
retryCount: Value(receipt.retryCount + 1),
|
||||
lastRetry: Value(DateTime.now()),
|
||||
markForRetry: const Value(null),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ Future<SignalContactSignedPreKey?> getSignedPreKeyByContactId(
|
|||
}
|
||||
} else {
|
||||
unawaited(requestNewSignedPreKeyForContact(contactId));
|
||||
Log.error('Contact $contactId does not have a signed pre key!');
|
||||
Log.warn('Contact $contactId does not have a signed pre key!');
|
||||
}
|
||||
return signedPreKey;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ class _ProfileViewState extends State<ProfileView> {
|
|||
..avatarCounter = user.avatarCounter + 1;
|
||||
return user;
|
||||
});
|
||||
setState(() {}); // gUser has updated
|
||||
if (mounted) setState(() {}); // gUser has updated
|
||||
}
|
||||
|
||||
Future<void> _updateUsername(String username) async {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ description: "twonly, a privacy-friendly way to connect with friends through sec
|
|||
|
||||
publish_to: 'none'
|
||||
|
||||
version: 0.0.82+82
|
||||
version: 0.0.83+83
|
||||
|
||||
environment:
|
||||
sdk: ^3.6.0
|
||||
|
|
|
|||
Loading…
Reference in a new issue