mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 07:48:40 +00:00
fix #326
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
bc1c61c8f8
commit
25114daee2
18 changed files with 138 additions and 51 deletions
|
|
@ -1,5 +1,12 @@
|
|||
# Changelog
|
||||
|
||||
## 0.0.73
|
||||
|
||||
- Integrated QR code scanner in the main camera
|
||||
- New profile share page
|
||||
- New workflow for checking the security number
|
||||
- Improved user interface for creating voice messages
|
||||
|
||||
## 0.0.69
|
||||
|
||||
- Option to export and import memories
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
PODS:
|
||||
- app_links (7.0.0):
|
||||
- Flutter
|
||||
- audio_waveforms (0.0.1):
|
||||
- Flutter
|
||||
- background_downloader (0.0.1):
|
||||
|
|
@ -324,6 +326,7 @@ PODS:
|
|||
- FlutterMacOS
|
||||
|
||||
DEPENDENCIES:
|
||||
- app_links (from `.symlinks/plugins/app_links/ios`)
|
||||
- audio_waveforms (from `.symlinks/plugins/audio_waveforms/ios`)
|
||||
- background_downloader (from `.symlinks/plugins/background_downloader/ios`)
|
||||
- camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`)
|
||||
|
|
@ -400,6 +403,8 @@ SPEC REPOS:
|
|||
- SwiftyGif
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
app_links:
|
||||
:path: ".symlinks/plugins/app_links/ios"
|
||||
audio_waveforms:
|
||||
:path: ".symlinks/plugins/audio_waveforms/ios"
|
||||
background_downloader:
|
||||
|
|
@ -472,6 +477,7 @@ EXTERNAL SOURCES:
|
|||
:path: ".symlinks/plugins/video_player_avfoundation/darwin"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
app_links: a754cbec3c255bd4bbb4d236ecc06f28cd9a7ce8
|
||||
audio_waveforms: a6dde7fe7c0ea05f06ffbdb0f7c1b2b2ba6cedcf
|
||||
background_downloader: 50e91d979067b82081aba359d7d916b3ba5fadad
|
||||
camera_avfoundation: 5675ca25298b6f81fa0a325188e7df62cc217741
|
||||
|
|
|
|||
|
|
@ -155,6 +155,7 @@ class _AppMainWidgetState extends State<AppMainWidget> {
|
|||
bool _showDatabaseMigration = false;
|
||||
bool _showOnboarding = true;
|
||||
bool _isLoaded = false;
|
||||
bool _skipBackup = false;
|
||||
|
||||
(Future<int>?, bool) _proofOfWork = (null, false);
|
||||
|
||||
|
|
@ -203,9 +204,10 @@ class _AppMainWidgetState extends State<AppMainWidget> {
|
|||
if (_showDatabaseMigration) {
|
||||
child = const DatabaseMigrationView();
|
||||
} else if (_isUserCreated) {
|
||||
if (gUser.twonlySafeBackup == null) {
|
||||
if (gUser.twonlySafeBackup == null && !_skipBackup) {
|
||||
child = TwonlyIdentityBackupView(
|
||||
callBack: () {
|
||||
_skipBackup = true;
|
||||
setState(() {});
|
||||
},
|
||||
);
|
||||
|
|
|
|||
|
|
@ -445,5 +445,6 @@
|
|||
"voiceMessageSlideToCancel": "Zum Abbrechen ziehen",
|
||||
"voiceMessageCancel": "Abbrechen",
|
||||
"shareYourProfile": "Teile dein Profil",
|
||||
"scanOtherProfile": "Scanne ein anderes Profil"
|
||||
"scanOtherProfile": "Scanne ein anderes Profil",
|
||||
"skipForNow": "Vorerst überspringen"
|
||||
}
|
||||
|
|
@ -475,5 +475,6 @@
|
|||
"voiceMessageSlideToCancel": "Slide to cancel",
|
||||
"voiceMessageCancel": "Cancel",
|
||||
"shareYourProfile": "Share your profile",
|
||||
"scanOtherProfile": "Scan other profile"
|
||||
"scanOtherProfile": "Scan other profile",
|
||||
"skipForNow": "Skip for now"
|
||||
}
|
||||
|
|
@ -2773,6 +2773,12 @@ abstract class AppLocalizations {
|
|||
/// In en, this message translates to:
|
||||
/// **'Scan other profile'**
|
||||
String get scanOtherProfile;
|
||||
|
||||
/// No description provided for @skipForNow.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Skip for now'**
|
||||
String get skipForNow;
|
||||
}
|
||||
|
||||
class _AppLocalizationsDelegate
|
||||
|
|
|
|||
|
|
@ -1528,4 +1528,7 @@ class AppLocalizationsDe extends AppLocalizations {
|
|||
|
||||
@override
|
||||
String get scanOtherProfile => 'Scanne ein anderes Profil';
|
||||
|
||||
@override
|
||||
String get skipForNow => 'Vorerst überspringen';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1518,4 +1518,7 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||
|
||||
@override
|
||||
String get scanOtherProfile => 'Scan other profile';
|
||||
|
||||
@override
|
||||
String get skipForNow => 'Skip for now';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1408,6 +1408,7 @@ class Response_UserData extends $pb.GeneratedMessage {
|
|||
$core.List<$core.int>? signedPrekeySignature,
|
||||
$fixnum.Int64? signedPrekeyId,
|
||||
$core.List<$core.int>? username,
|
||||
$fixnum.Int64? registrationId,
|
||||
}) {
|
||||
final result = create();
|
||||
if (userId != null) result.userId = userId;
|
||||
|
|
@ -1418,6 +1419,7 @@ class Response_UserData extends $pb.GeneratedMessage {
|
|||
result.signedPrekeySignature = signedPrekeySignature;
|
||||
if (signedPrekeyId != null) result.signedPrekeyId = signedPrekeyId;
|
||||
if (username != null) result.username = username;
|
||||
if (registrationId != null) result.registrationId = registrationId;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -1448,6 +1450,7 @@ class Response_UserData extends $pb.GeneratedMessage {
|
|||
..aInt64(6, _omitFieldNames ? '' : 'signedPrekeyId')
|
||||
..a<$core.List<$core.int>>(
|
||||
7, _omitFieldNames ? '' : 'username', $pb.PbFieldType.OY)
|
||||
..aInt64(8, _omitFieldNames ? '' : 'registrationId')
|
||||
..hasRequiredFields = false;
|
||||
|
||||
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||
|
|
@ -1528,6 +1531,15 @@ class Response_UserData extends $pb.GeneratedMessage {
|
|||
$core.bool hasUsername() => $_has(6);
|
||||
@$pb.TagNumber(7)
|
||||
void clearUsername() => $_clearField(7);
|
||||
|
||||
@$pb.TagNumber(8)
|
||||
$fixnum.Int64 get registrationId => $_getI64(7);
|
||||
@$pb.TagNumber(8)
|
||||
set registrationId($fixnum.Int64 value) => $_setInt64(7, value);
|
||||
@$pb.TagNumber(8)
|
||||
$core.bool hasRegistrationId() => $_has(7);
|
||||
@$pb.TagNumber(8)
|
||||
void clearRegistrationId() => $_clearField(8);
|
||||
}
|
||||
|
||||
class Response_UploadToken extends $pb.GeneratedMessage {
|
||||
|
|
|
|||
|
|
@ -498,6 +498,15 @@ const Response_UserData$json = {
|
|||
'10': 'signedPrekeyId',
|
||||
'17': true
|
||||
},
|
||||
{
|
||||
'1': 'registration_id',
|
||||
'3': 8,
|
||||
'4': 1,
|
||||
'5': 3,
|
||||
'9': 5,
|
||||
'10': 'registrationId',
|
||||
'17': true
|
||||
},
|
||||
],
|
||||
'8': [
|
||||
{'1': '_username'},
|
||||
|
|
@ -505,6 +514,7 @@ const Response_UserData$json = {
|
|||
{'1': '_signed_prekey'},
|
||||
{'1': '_signed_prekey_signature'},
|
||||
{'1': '_signed_prekey_id'},
|
||||
{'1': '_registration_id'},
|
||||
],
|
||||
};
|
||||
|
||||
|
|
@ -714,36 +724,37 @@ final $typed_data.Uint8List responseDescriptor = $convert.base64Decode(
|
|||
'aWQYASABKANSAmlkEhYKBnByZWtleRgCIAEoDFIGcHJla2V5GpUBCgxTaWduZWRQcmVLZXkSKA'
|
||||
'oQc2lnbmVkX3ByZWtleV9pZBgBIAEoA1IOc2lnbmVkUHJla2V5SWQSIwoNc2lnbmVkX3ByZWtl'
|
||||
'eRgCIAEoDFIMc2lnbmVkUHJla2V5EjYKF3NpZ25lZF9wcmVrZXlfc2lnbmF0dXJlGAMgASgMUh'
|
||||
'VzaWduZWRQcmVrZXlTaWduYXR1cmUatAMKCFVzZXJEYXRhEhcKB3VzZXJfaWQYASABKANSBnVz'
|
||||
'VzaWduZWR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Jlc3BvbnNlLkFkZEFjY291bnRzSW52aX'
|
||||
'Rlc0gAUhJhZGRhY2NvdW50c2ludml0ZXMSUwoOZG93bmxvYWR0b2tlbnMYDSABKAsyKS5zZXJ2'
|
||||
'ZXJfdG9fY2xpZW50LlJlc3BvbnNlLkRvd25sb2FkVG9rZW5zSABSDmRvd25sb2FkdG9rZW5zEk'
|
||||
'0KDHNpZ25lZHByZWtleRgOIAEoCzInLnNlcnZlcl90b19jbGllbnQuUmVzcG9uc2UuU2lnbmVk'
|
||||
'UHJlS2V5SABSDHNpZ25lZHByZWtleRJKCgtwcm9vZk9mV29yaxgPIAEoCzImLnNlcnZlcl90b1'
|
||||
'9jbGllbnQuUmVzcG9uc2UuUHJvb2ZPZldvcmtIAFILcHJvb2ZPZldvcmtCBAoCT2silgEKEFRy'
|
||||
'YW5zYWN0aW9uVHlwZXMSCgoGUmVmdW5kEAASEwoPVm91Y2hlclJlZGVlbWVkEAESEgoOVm91Y2'
|
||||
'hlckNyZWF0ZWQQAhIICgRDYXNoEAMSDwoLUGxhblVwZ3JhZGUQBBILCgdVbmtub3duEAUSFAoQ'
|
||||
'VGhhbmtzRm9yVGVzdGluZxAGEg8KC0F1dG9SZW5ld2FsEAdCCgoIUmVzcG9uc2U=');
|
||||
|
|
|
|||
|
|
@ -174,7 +174,9 @@ Future<void> showLocalPushNotification(
|
|||
);
|
||||
|
||||
await flutterLocalNotificationsPlugin.show(
|
||||
pushUser.userId.toInt(),
|
||||
pushUser.userId.toInt() %
|
||||
// ignore: avoid_js_rounded_ints
|
||||
2373257871630019505, // Invalid argument (id): must fit within the size of a 32-bit integer
|
||||
title,
|
||||
body,
|
||||
notificationDetails,
|
||||
|
|
|
|||
|
|
@ -54,8 +54,9 @@ Future<CiphertextMessage?> signalEncryptMessage(
|
|||
|
||||
final tempIdentityKey = await signalStore.getIdentity(address);
|
||||
if (tempIdentityKey != null) {
|
||||
final registrationId = await session.getRemoteRegistrationId();
|
||||
final preKeyBundle = PreKeyBundle(
|
||||
target,
|
||||
registrationId,
|
||||
defaultDeviceId,
|
||||
preKey?.preKeyId,
|
||||
tempPrePublicKey,
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ Future<bool> createNewSignalSession(Response_UserData userData) async {
|
|||
);
|
||||
|
||||
final preKeyBundle = PreKeyBundle(
|
||||
userData.userId.toInt(),
|
||||
userData.registrationId.toInt(),
|
||||
defaultDeviceId,
|
||||
tempPreKeyId,
|
||||
tempPrePublicKey,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import 'package:flutter/services.dart';
|
|||
import 'package:flutter_image_compress/flutter_image_compress.dart';
|
||||
import 'package:gal/gal.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:libsignal_protocol_dart/libsignal_protocol_dart.dart';
|
||||
import 'package:local_auth/local_auth.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:twonly/src/database/tables/mediafiles.table.dart';
|
||||
|
|
@ -310,9 +309,6 @@ String getUUIDforDirectChat(int a, int b) {
|
|||
if (a < 0 || b < 0) {
|
||||
throw ArgumentError('Inputs must be non-negative integers.');
|
||||
}
|
||||
if (a > integerMax || b > integerMax) {
|
||||
throw ArgumentError('Inputs must be <= 0x7fffffff.');
|
||||
}
|
||||
|
||||
// Mask to 64 bits in case inputs exceed 64 bits
|
||||
final mask64 = (BigInt.one << 64) - BigInt.one;
|
||||
|
|
|
|||
|
|
@ -822,6 +822,9 @@ class _CameraPreviewViewState extends State<CameraPreviewView> {
|
|||
(c) {
|
||||
return GestureDetector(
|
||||
onTap: () async {
|
||||
if (c.isLoading) return;
|
||||
c.isLoading = true;
|
||||
widget.mainCameraController.setState();
|
||||
await addNewContactFromPublicProfile(c.profile);
|
||||
widget.mainCameraController.scannedNewProfiles
|
||||
.remove(c.profile.userId.toInt());
|
||||
|
|
@ -838,16 +841,25 @@ class _CameraPreviewViewState extends State<CameraPreviewView> {
|
|||
children: [
|
||||
Text(c.profile.username),
|
||||
Expanded(child: Container()),
|
||||
ColoredBox(
|
||||
color: Colors.transparent,
|
||||
child: FaIcon(
|
||||
FontAwesomeIcons.userPlus,
|
||||
color: isDarkMode(context)
|
||||
? Colors.white
|
||||
: Colors.black,
|
||||
size: 17,
|
||||
if (c.isLoading)
|
||||
const SizedBox(
|
||||
width: 12,
|
||||
height: 12,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2,
|
||||
),
|
||||
)
|
||||
else
|
||||
ColoredBox(
|
||||
color: Colors.transparent,
|
||||
child: FaIcon(
|
||||
FontAwesomeIcons.userPlus,
|
||||
color: isDarkMode(context)
|
||||
? Colors.white
|
||||
: Colors.black,
|
||||
size: 17,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -27,8 +27,10 @@ class ScannedVerifiedContact {
|
|||
class ScannedNewProfile {
|
||||
ScannedNewProfile({
|
||||
required this.profile,
|
||||
this.isLoading = false,
|
||||
});
|
||||
PublicProfile profile;
|
||||
bool isLoading;
|
||||
}
|
||||
|
||||
class MainCameraController {
|
||||
|
|
@ -198,7 +200,7 @@ class MainCameraController {
|
|||
final contact =
|
||||
await twonlyDB.contactsDao.getContactById(profile.userId.toInt());
|
||||
|
||||
if (contact != null) {
|
||||
if (contact != null && contact.accepted) {
|
||||
if (contactsVerified[contact.userId] == null) {
|
||||
final storedPublicKey =
|
||||
await getPublicKeyFromContact(contact.userId);
|
||||
|
|
|
|||
|
|
@ -221,6 +221,21 @@ class _TwonlyIdentityBackupViewState extends State<TwonlyIdentityBackupView> {
|
|||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
if (widget.callBack != null) {
|
||||
widget.callBack!();
|
||||
} else {
|
||||
Navigator.pop(context);
|
||||
}
|
||||
},
|
||||
child: Text(
|
||||
context.lang.skipForNow,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(fontSize: 8, color: Colors.grey),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -57,9 +57,16 @@ void main() {
|
|||
'00000000-1234-5678-0000-00000abcdef0',
|
||||
);
|
||||
});
|
||||
|
||||
test('Reject values > 0x7fffffff', () {
|
||||
expect(() => getUUIDforDirectChat(0x80000000, 0), throwsArgumentError);
|
||||
test('Arbitrary within 32-bit range', () {
|
||||
expect(
|
||||
// ignore: avoid_js_rounded_ints
|
||||
getUUIDforDirectChat(0x7dc8a4f20a75de46, 0x7ffffffffffffff8),
|
||||
'7fffffff-ffff-fff8-7dc8-a4f20a75de46',
|
||||
);
|
||||
});
|
||||
|
||||
// test('Reject values > 0x7fffffff', () {
|
||||
// expect(() => getUUIDforDirectChat(0x80000000, 0), throwsArgumentError);
|
||||
// });
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue