mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 09:28:41 +00:00
multiple bug fixes
This commit is contained in:
parent
23ae553203
commit
5243fd609f
7 changed files with 39 additions and 34 deletions
|
|
@ -294,8 +294,12 @@ class ApiService {
|
|||
}
|
||||
if (res.error == ErrorCode.UserIdNotFound && contactId != null) {
|
||||
Log.error("Contact deleted their account $contactId.");
|
||||
await twonlyDB.contactsDao
|
||||
.updateContact(contactId, ContactsCompanion(deleted: Value(true)));
|
||||
await twonlyDB.contactsDao.updateContact(
|
||||
contactId,
|
||||
ContactsCompanion(
|
||||
deleted: Value(true),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
|
|
|
|||
|
|
@ -77,7 +77,8 @@ Future<bool> isAllowedToDownload(bool isVideo) async {
|
|||
Future startDownloadMedia(Message message, bool force,
|
||||
{int retryCounter = 0}) async {
|
||||
if (message.contentJson == null) return;
|
||||
if (downloadStartedForMediaReceived[message.messageId] != null) {
|
||||
if (downloadStartedForMediaReceived[message.messageId] != null &&
|
||||
retryCounter == 0) {
|
||||
DateTime started = downloadStartedForMediaReceived[message.messageId]!;
|
||||
Duration elapsed = DateTime.now().difference(started);
|
||||
if (elapsed <= Duration(seconds: 60)) {
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ Future<client.Response> handleNewMessage(int fromUserId, Uint8List body) async {
|
|||
}
|
||||
|
||||
await encryptAndSendMessageAsync(
|
||||
message.messageId!,
|
||||
null,
|
||||
fromUserId,
|
||||
MessageJson(
|
||||
kind: MessageKind.ack,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:twonly/globals.dart';
|
||||
import 'package:twonly/src/utils/log.dart';
|
||||
import 'package:twonly/src/views/camera/image_editor/layers/filter_layer.dart';
|
||||
import 'package:twonly/src/views/camera/image_editor/layers/filters/datetime_filter.dart';
|
||||
import 'package:twonly/src/model/protobuf/api/server_to_client.pb.dart';
|
||||
|
|
@ -140,8 +141,9 @@ Future<List<Sticker>> getStickerIndex() async {
|
|||
return res;
|
||||
}
|
||||
}
|
||||
final response =
|
||||
await http.get(Uri.parse('https://twonly.eu/api/sticker/stickers.json'));
|
||||
try {
|
||||
final response = await http
|
||||
.get(Uri.parse('https://twonly.eu/api/sticker/stickers.json'));
|
||||
if (response.statusCode == 200) {
|
||||
await indexFile.writeAsString(response.body);
|
||||
List<dynamic> jsonList = json.decode(response.body);
|
||||
|
|
@ -149,4 +151,8 @@ Future<List<Sticker>> getStickerIndex() async {
|
|||
} else {
|
||||
return res;
|
||||
}
|
||||
} catch (e) {
|
||||
Log.error("$e");
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,10 +22,12 @@ class _VideoPlayerWrapperState extends State<VideoPlayerWrapper> {
|
|||
super.initState();
|
||||
_controller = VideoPlayerController.file(widget.videoPath)
|
||||
..initialize().then((_) {
|
||||
if (context.mounted) {
|
||||
setState(() {
|
||||
_controller.setLooping(true);
|
||||
_controller.play();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
28
pubspec.lock
28
pubspec.lock
|
|
@ -173,18 +173,18 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: camera_android_camerax
|
||||
sha256: "0bd3d1645df00af2540a22df13ba466ac5fb2838a09bce4089cecdb1712a9e94"
|
||||
sha256: "68d7ec97439108ac22cfba34bb74d0ab53adbc017175116d2cbc5a3d8fc8ea5e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.6.18"
|
||||
version: "0.6.18+2"
|
||||
camera_avfoundation:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: camera_avfoundation
|
||||
sha256: fdc0e668f65c8ddfb3be6c10ef4737fb6274cd04d8053a9525d410642f7989c0
|
||||
sha256: ca244564876d5a76f2126bca501aec25243cad23ba1784819242aea2fd25cf70
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.9.19+1"
|
||||
version: "0.9.19+2"
|
||||
camera_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -221,10 +221,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: checked_yaml
|
||||
sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff
|
||||
sha256: "959525d3162f249993882720d52b7e0c833978df229be20702b33d48d91de70f"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.3"
|
||||
version: "2.0.4"
|
||||
cli_util:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -959,10 +959,10 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: libsignal_protocol_dart
|
||||
sha256: "385c0d499d70063739ab6963455a4e889aea16d6a4c9e769371d7ed2d1427ef6"
|
||||
sha256: "2b18de43016474ab85d21553a88f59d6f4fea8c2eddf35be7e24ab5f8969a81d"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.7.3"
|
||||
version: "0.7.4"
|
||||
lints:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1752,14 +1752,6 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
very_good_analysis:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: very_good_analysis
|
||||
sha256: "62d2b86d183fb81b2edc22913d9f155d26eb5cf3855173adb1f59fac85035c63"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "7.0.0"
|
||||
video_compress:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -1772,10 +1764,10 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: video_player
|
||||
sha256: "7d78f0cfaddc8c19d4cb2d3bebe1bfef11f2103b0a03e5398b303a1bf65eeb14"
|
||||
sha256: "0d55b1f1a31e5ad4c4967bfaa8ade0240b07d20ee4af1dfef5f531056512961a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.9.5"
|
||||
version: "2.10.0"
|
||||
video_player_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ description: "twonly, a privacy-friendly way to connect with friends through sec
|
|||
# Prevent accidental publishing to pub.dev.
|
||||
publish_to: 'none'
|
||||
|
||||
version: 0.0.32+32
|
||||
version: 0.0.34+34
|
||||
|
||||
environment:
|
||||
sdk: ^3.6.0
|
||||
|
|
|
|||
Loading…
Reference in a new issue