mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-09-01 08:04:07 +00:00
move file
This commit is contained in:
parent
95054068f7
commit
3c26bf55a8
12 changed files with 41 additions and 14 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:get_it/get_it.dart';
|
||||
import 'package:twonly/src/database/twonly.db.dart';
|
||||
import 'package:twonly/src/services/api.service.dart';
|
||||
import 'package:twonly/src/services/api/api.service.dart';
|
||||
import 'package:twonly/src/services/user.service.dart';
|
||||
|
||||
final GetIt locator = GetIt.instance;
|
||||
|
|
|
|||
0
lib/src/services/memories/cloud.service.dart
Normal file
0
lib/src/services/memories/cloud.service.dart
Normal file
|
|
@ -613,6 +613,13 @@ packages:
|
|||
url: "https://github.com/yenchieh/flutter_android_volume_keydown.git"
|
||||
source: git
|
||||
version: "1.0.1"
|
||||
flutter_blurhash:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: "dependencies/flutter_blurhash"
|
||||
relative: true
|
||||
source: path
|
||||
version: "0.9.1"
|
||||
flutter_cache_manager:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ dependencies:
|
|||
screen_protector: ^1.5.1
|
||||
flutter_markdown_plus: ^1.0.7
|
||||
exif: ^3.3.0
|
||||
flutter_blurhash: ^0.9.1
|
||||
|
||||
# With high download. (But should be checked nonetheless.)
|
||||
app_links: ^7.0.0 # 1.6 mio
|
||||
|
|
@ -175,6 +176,8 @@ dependency_overrides:
|
|||
path: ./dependencies/exif
|
||||
sprintf:
|
||||
path: ./dependencies/sprintf
|
||||
flutter_blurhash:
|
||||
path: ./dependencies/flutter_blurhash
|
||||
|
||||
dev_dependencies:
|
||||
build_runner: ^2.4.15
|
||||
|
|
|
|||
|
|
@ -10,9 +10,10 @@ import 'package:twonly/src/constants/secure_storage.keys.dart';
|
|||
import 'package:twonly/src/database/tables/messages.table.dart';
|
||||
import 'package:twonly/src/database/twonly.db.dart';
|
||||
import 'package:twonly/src/model/json/userdata.model.dart';
|
||||
import 'package:twonly/src/model/protobuf/client/generated/messages.pb.dart' as pb;
|
||||
import 'package:twonly/src/model/protobuf/client/generated/messages.pb.dart'
|
||||
as pb;
|
||||
import 'package:twonly/src/model/protobuf/client/generated/push_notification.pb.dart';
|
||||
import 'package:twonly/src/services/api.service.dart';
|
||||
import 'package:twonly/src/services/api/api.service.dart';
|
||||
import 'package:twonly/src/services/api/messages.api.dart';
|
||||
import 'package:twonly/src/services/notifications/pushkeys.notifications.dart';
|
||||
import 'package:twonly/src/services/signal/identity.signal.dart';
|
||||
|
|
@ -240,7 +241,12 @@ class TestClient {
|
|||
await api.sendTextMessage(target.realUserId, msg.writeToBuffer(), null);
|
||||
}
|
||||
|
||||
Future<void> sendReaction(TestClient target, String targetMessageId, String emoji, {bool remove = false}) async {
|
||||
Future<void> sendReaction(
|
||||
TestClient target,
|
||||
String targetMessageId,
|
||||
String emoji, {
|
||||
bool remove = false,
|
||||
}) async {
|
||||
final content = pb.EncryptedContent()
|
||||
..groupId = defaultGroup!.groupId
|
||||
..reaction = (pb.EncryptedContent_Reaction()
|
||||
|
|
@ -250,7 +256,12 @@ class TestClient {
|
|||
await sendEncryptedContent(target, content);
|
||||
}
|
||||
|
||||
Future<void> sendMessageUpdate(TestClient target, String targetMessageId, pb.EncryptedContent_MessageUpdate_Type type, {String? text}) async {
|
||||
Future<void> sendMessageUpdate(
|
||||
TestClient target,
|
||||
String targetMessageId,
|
||||
pb.EncryptedContent_MessageUpdate_Type type, {
|
||||
String? text,
|
||||
}) async {
|
||||
final update = pb.EncryptedContent_MessageUpdate()
|
||||
..type = type
|
||||
..senderMessageId = targetMessageId
|
||||
|
|
@ -262,7 +273,11 @@ class TestClient {
|
|||
await sendEncryptedContent(target, content);
|
||||
}
|
||||
|
||||
Future<void> sendMedia(TestClient target, String senderMessageId, pb.EncryptedContent_Media_Type type) async {
|
||||
Future<void> sendMedia(
|
||||
TestClient target,
|
||||
String senderMessageId,
|
||||
pb.EncryptedContent_Media_Type type,
|
||||
) async {
|
||||
final content = pb.EncryptedContent()
|
||||
..groupId = defaultGroup!.groupId
|
||||
..media = (pb.EncryptedContent_Media()
|
||||
|
|
@ -288,8 +303,10 @@ class TestClient {
|
|||
Future<Reaction> expectReaction(String messageId, String emoji) async {
|
||||
for (var i = 0; i < 500; i++) {
|
||||
final reaction = await run(() async {
|
||||
final reactions = await (env.db.select(env.db.reactions)..where((t) => t.messageId.equals(messageId))).get();
|
||||
return reactions.firstWhereOrNull((r) => r.emoji == emoji);
|
||||
final reactions = await (env.db.select(
|
||||
env.db.reactions,
|
||||
)..where((t) => t.messageId.equals(messageId))).get();
|
||||
return reactions.firstWhereOrNull((r) => r.emoji == emoji);
|
||||
});
|
||||
if (reaction != null) return reaction;
|
||||
await Future.delayed(const Duration(milliseconds: 10));
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import 'package:drift/native.dart';
|
|||
import 'package:libsignal_protocol_dart/libsignal_protocol_dart.dart';
|
||||
import 'package:twonly/src/database/twonly.db.dart';
|
||||
import 'package:twonly/src/model/json/userdata.model.dart';
|
||||
import 'package:twonly/src/services/api.service.dart';
|
||||
import 'package:twonly/src/services/api/api.service.dart';
|
||||
import 'package:twonly/src/services/user.service.dart';
|
||||
import 'package:twonly/src/utils/keyvalue.dart';
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import 'package:twonly/src/database/tables/messages.table.dart';
|
|||
import 'package:twonly/src/database/twonly.db.dart';
|
||||
import 'package:twonly/src/model/protobuf/client/generated/messages.pb.dart'
|
||||
as pb;
|
||||
import 'package:twonly/src/services/api.service.dart';
|
||||
import 'package:twonly/src/services/api/api.service.dart';
|
||||
import 'package:twonly/src/services/user.service.dart';
|
||||
import 'package:workmanager/workmanager.dart';
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import 'package:twonly/src/database/twonly.db.dart';
|
|||
import 'package:twonly/src/model/json/backup.model.dart';
|
||||
import 'package:twonly/src/model/json/userdata.model.dart'
|
||||
hide LastBackupUploadState;
|
||||
import 'package:twonly/src/services/api.service.dart';
|
||||
import 'package:twonly/src/services/api/api.service.dart';
|
||||
import 'package:twonly/src/services/backup.service.dart';
|
||||
import 'package:twonly/src/services/user.service.dart';
|
||||
import 'package:twonly/src/utils/keyvalue.dart';
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import 'package:twonly/locator.dart';
|
|||
import 'package:twonly/src/database/tables/groups.table.dart';
|
||||
import 'package:twonly/src/database/twonly.db.dart';
|
||||
import 'package:twonly/src/model/json/userdata.model.dart';
|
||||
import 'package:twonly/src/services/api.service.dart';
|
||||
import 'package:twonly/src/services/api/api.service.dart';
|
||||
import 'package:twonly/src/services/group.service.dart';
|
||||
import 'package:twonly/src/services/user.service.dart';
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import 'package:twonly/src/database/daos/key_verification.dao.dart';
|
|||
import 'package:twonly/src/database/tables/contacts.table.dart';
|
||||
import 'package:twonly/src/database/twonly.db.dart';
|
||||
import 'package:twonly/src/model/json/userdata.model.dart';
|
||||
import 'package:twonly/src/services/api.service.dart';
|
||||
import 'package:twonly/src/services/api/api.service.dart';
|
||||
import 'package:twonly/src/services/user.service.dart';
|
||||
|
||||
void main() {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import 'package:twonly/src/model/protobuf/api/websocket/server_to_client.pb.dart
|
|||
as api_pb;
|
||||
import 'package:twonly/src/model/protobuf/client/generated/messages.pb.dart'
|
||||
as pb;
|
||||
import 'package:twonly/src/services/api.service.dart';
|
||||
import 'package:twonly/src/services/api/api.service.dart';
|
||||
import 'package:twonly/src/services/api/utils.api.dart';
|
||||
import 'package:twonly/src/services/passwordless_recovery.service.dart';
|
||||
import 'package:twonly/src/services/signal/identity.signal.dart';
|
||||
|
|
|
|||
Loading…
Reference in a new issue