Compare commits

..

No commits in common. "main" and "v0.0.80" have entirely different histories.

35 changed files with 171 additions and 7467 deletions

View file

@ -1,17 +1,5 @@
# Changelog
## 0.0.82
- Added an option in the settings to automatically save all sent images
- Hides duplicate images in the memory
- Fixes a bug where messages were not being received
- Several other minor improvements
## 0.0.81
- Fixes the issue where black/blank images were sometimes received
- Fixes an issue in the image editor
## 0.0.80
- Share images/videos directly from other applications

View file

@ -100,14 +100,6 @@ class MediaFilesDao extends DatabaseAccessor<TwonlyDB>
.get();
}
Future<List<MediaFile>> getAllNonHashedStoredMediaFiles() async {
return (select(mediaFiles)
..where(
(t) => t.stored.equals(true) & t.storedFileHash.isNull(),
))
.get();
}
Future<List<MediaFile>> getAllMediaFilesPendingUpload() async {
return (select(mediaFiles)
..where(
@ -119,10 +111,7 @@ class MediaFilesDao extends DatabaseAccessor<TwonlyDB>
}
Stream<List<MediaFile>> watchAllStoredMediaFiles() {
final query = (select(mediaFiles)..where((t) => t.stored.equals(true)))
.join([])
..groupBy([mediaFiles.storedFileHash]);
return query.map((row) => row.readTable(mediaFiles)).watch();
return (select(mediaFiles)..where((t) => t.stored.equals(true))).watch();
}
Stream<List<MediaFile>> watchNewestMediaFiles() {

View file

@ -80,18 +80,10 @@ class ReceiptsDao extends DatabaseAccessor<TwonlyDB> with _$ReceiptsDaoMixin {
}
}
Future<List<Receipt>> getReceiptsForRetransmission() async {
final markedRetriesTime = DateTime.now().subtract(
const Duration(
// give the server time to transmit all messages to the client
seconds: 20,
),
);
Future<List<Receipt>> getReceiptsNotAckByServer() async {
return (select(receipts)
..where(
(t) =>
t.ackByServerAt.isNull() |
t.markForRetry.isSmallerThanValue(markedRetriesTime),
(t) => t.ackByServerAt.isNull(),
))
.get();
}
@ -108,14 +100,6 @@ class ReceiptsDao extends DatabaseAccessor<TwonlyDB> with _$ReceiptsDaoMixin {
.write(updates);
}
Future<void> markMessagesForRetry(int contactId) async {
await (update(receipts)..where((c) => c.contactId.equals(contactId))).write(
ReceiptsCompanion(
markForRetry: Value(DateTime.now()),
),
);
}
Future<bool> isDuplicated(String receiptId) async {
return await (select(receivedReceipts)
..where((t) => t.receiptId.equals(receiptId)))

File diff suppressed because one or more lines are too long

View file

@ -59,8 +59,6 @@ class MediaFiles extends Table {
BlobColumn get encryptionMac => blob().nullable()();
BlobColumn get encryptionNonce => blob().nullable()();
BlobColumn get storedFileHash => blob().nullable()();
DateTimeColumn get createdAt => dateTime().withDefault(currentDateAndTime)();
@override

View file

@ -20,8 +20,6 @@ class Receipts extends Table {
BoolColumn get contactWillSendsReceipt =>
boolean().withDefault(const Constant(true))();
DateTimeColumn get markForRetry => dateTime().nullable()();
DateTimeColumn get ackByServerAt => dateTime().nullable()();
IntColumn get retryCount => integer().withDefault(const Constant(0))();

View file

@ -67,7 +67,7 @@ class TwonlyDB extends _$TwonlyDB {
TwonlyDB.forTesting(DatabaseConnection super.connection);
@override
int get schemaVersion => 5;
int get schemaVersion => 4;
static QueryExecutor _openConnection() {
return driftDatabase(
@ -103,13 +103,6 @@ class TwonlyDB extends _$TwonlyDB {
),
);
},
from4To5: (m, schema) async {
await m.addColumn(schema.receipts, schema.receipts.markForRetry);
await m.addColumn(
schema.mediaFiles,
schema.mediaFiles.storedFileHash,
);
},
),
);
}

View file

@ -1996,12 +1996,6 @@ class $MediaFilesTable extends MediaFiles
late final GeneratedColumn<Uint8List> encryptionNonce =
GeneratedColumn<Uint8List>('encryption_nonce', aliasedName, true,
type: DriftSqlType.blob, requiredDuringInsert: false);
static const VerificationMeta _storedFileHashMeta =
const VerificationMeta('storedFileHash');
@override
late final GeneratedColumn<Uint8List> storedFileHash =
GeneratedColumn<Uint8List>('stored_file_hash', aliasedName, true,
type: DriftSqlType.blob, requiredDuringInsert: false);
static const VerificationMeta _createdAtMeta =
const VerificationMeta('createdAt');
@override
@ -2026,7 +2020,6 @@ class $MediaFilesTable extends MediaFiles
encryptionKey,
encryptionMac,
encryptionNonce,
storedFileHash,
createdAt
];
@override
@ -2098,12 +2091,6 @@ class $MediaFilesTable extends MediaFiles
encryptionNonce.isAcceptableOrUnknown(
data['encryption_nonce']!, _encryptionNonceMeta));
}
if (data.containsKey('stored_file_hash')) {
context.handle(
_storedFileHashMeta,
storedFileHash.isAcceptableOrUnknown(
data['stored_file_hash']!, _storedFileHashMeta));
}
if (data.containsKey('created_at')) {
context.handle(_createdAtMeta,
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta));
@ -2150,8 +2137,6 @@ class $MediaFilesTable extends MediaFiles
.read(DriftSqlType.blob, data['${effectivePrefix}encryption_mac']),
encryptionNonce: attachedDatabase.typeMapping
.read(DriftSqlType.blob, data['${effectivePrefix}encryption_nonce']),
storedFileHash: attachedDatabase.typeMapping
.read(DriftSqlType.blob, data['${effectivePrefix}stored_file_hash']),
createdAt: attachedDatabase.typeMapping
.read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!,
);
@ -2196,7 +2181,6 @@ class MediaFile extends DataClass implements Insertable<MediaFile> {
final Uint8List? encryptionKey;
final Uint8List? encryptionMac;
final Uint8List? encryptionNonce;
final Uint8List? storedFileHash;
final DateTime createdAt;
const MediaFile(
{required this.mediaId,
@ -2213,7 +2197,6 @@ class MediaFile extends DataClass implements Insertable<MediaFile> {
this.encryptionKey,
this.encryptionMac,
this.encryptionNonce,
this.storedFileHash,
required this.createdAt});
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
@ -2258,9 +2241,6 @@ class MediaFile extends DataClass implements Insertable<MediaFile> {
if (!nullToAbsent || encryptionNonce != null) {
map['encryption_nonce'] = Variable<Uint8List>(encryptionNonce);
}
if (!nullToAbsent || storedFileHash != null) {
map['stored_file_hash'] = Variable<Uint8List>(storedFileHash);
}
map['created_at'] = Variable<DateTime>(createdAt);
return map;
}
@ -2300,9 +2280,6 @@ class MediaFile extends DataClass implements Insertable<MediaFile> {
encryptionNonce: encryptionNonce == null && nullToAbsent
? const Value.absent()
: Value(encryptionNonce),
storedFileHash: storedFileHash == null && nullToAbsent
? const Value.absent()
: Value(storedFileHash),
createdAt: Value(createdAt),
);
}
@ -2331,7 +2308,6 @@ class MediaFile extends DataClass implements Insertable<MediaFile> {
encryptionKey: serializer.fromJson<Uint8List?>(json['encryptionKey']),
encryptionMac: serializer.fromJson<Uint8List?>(json['encryptionMac']),
encryptionNonce: serializer.fromJson<Uint8List?>(json['encryptionNonce']),
storedFileHash: serializer.fromJson<Uint8List?>(json['storedFileHash']),
createdAt: serializer.fromJson<DateTime>(json['createdAt']),
);
}
@ -2357,7 +2333,6 @@ class MediaFile extends DataClass implements Insertable<MediaFile> {
'encryptionKey': serializer.toJson<Uint8List?>(encryptionKey),
'encryptionMac': serializer.toJson<Uint8List?>(encryptionMac),
'encryptionNonce': serializer.toJson<Uint8List?>(encryptionNonce),
'storedFileHash': serializer.toJson<Uint8List?>(storedFileHash),
'createdAt': serializer.toJson<DateTime>(createdAt),
};
}
@ -2377,7 +2352,6 @@ class MediaFile extends DataClass implements Insertable<MediaFile> {
Value<Uint8List?> encryptionKey = const Value.absent(),
Value<Uint8List?> encryptionMac = const Value.absent(),
Value<Uint8List?> encryptionNonce = const Value.absent(),
Value<Uint8List?> storedFileHash = const Value.absent(),
DateTime? createdAt}) =>
MediaFile(
mediaId: mediaId ?? this.mediaId,
@ -2405,8 +2379,6 @@ class MediaFile extends DataClass implements Insertable<MediaFile> {
encryptionNonce: encryptionNonce.present
? encryptionNonce.value
: this.encryptionNonce,
storedFileHash:
storedFileHash.present ? storedFileHash.value : this.storedFileHash,
createdAt: createdAt ?? this.createdAt,
);
MediaFile copyWithCompanion(MediaFilesCompanion data) {
@ -2445,9 +2417,6 @@ class MediaFile extends DataClass implements Insertable<MediaFile> {
encryptionNonce: data.encryptionNonce.present
? data.encryptionNonce.value
: this.encryptionNonce,
storedFileHash: data.storedFileHash.present
? data.storedFileHash.value
: this.storedFileHash,
createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,
);
}
@ -2469,7 +2438,6 @@ class MediaFile extends DataClass implements Insertable<MediaFile> {
..write('encryptionKey: $encryptionKey, ')
..write('encryptionMac: $encryptionMac, ')
..write('encryptionNonce: $encryptionNonce, ')
..write('storedFileHash: $storedFileHash, ')
..write('createdAt: $createdAt')
..write(')'))
.toString();
@ -2491,7 +2459,6 @@ class MediaFile extends DataClass implements Insertable<MediaFile> {
$driftBlobEquality.hash(encryptionKey),
$driftBlobEquality.hash(encryptionMac),
$driftBlobEquality.hash(encryptionNonce),
$driftBlobEquality.hash(storedFileHash),
createdAt);
@override
bool operator ==(Object other) =>
@ -2512,8 +2479,6 @@ class MediaFile extends DataClass implements Insertable<MediaFile> {
$driftBlobEquality.equals(other.encryptionMac, this.encryptionMac) &&
$driftBlobEquality.equals(
other.encryptionNonce, this.encryptionNonce) &&
$driftBlobEquality.equals(
other.storedFileHash, this.storedFileHash) &&
other.createdAt == this.createdAt);
}
@ -2532,7 +2497,6 @@ class MediaFilesCompanion extends UpdateCompanion<MediaFile> {
final Value<Uint8List?> encryptionKey;
final Value<Uint8List?> encryptionMac;
final Value<Uint8List?> encryptionNonce;
final Value<Uint8List?> storedFileHash;
final Value<DateTime> createdAt;
final Value<int> rowid;
const MediaFilesCompanion({
@ -2550,7 +2514,6 @@ class MediaFilesCompanion extends UpdateCompanion<MediaFile> {
this.encryptionKey = const Value.absent(),
this.encryptionMac = const Value.absent(),
this.encryptionNonce = const Value.absent(),
this.storedFileHash = const Value.absent(),
this.createdAt = const Value.absent(),
this.rowid = const Value.absent(),
});
@ -2569,7 +2532,6 @@ class MediaFilesCompanion extends UpdateCompanion<MediaFile> {
this.encryptionKey = const Value.absent(),
this.encryptionMac = const Value.absent(),
this.encryptionNonce = const Value.absent(),
this.storedFileHash = const Value.absent(),
this.createdAt = const Value.absent(),
this.rowid = const Value.absent(),
}) : mediaId = Value(mediaId),
@ -2589,7 +2551,6 @@ class MediaFilesCompanion extends UpdateCompanion<MediaFile> {
Expression<Uint8List>? encryptionKey,
Expression<Uint8List>? encryptionMac,
Expression<Uint8List>? encryptionNonce,
Expression<Uint8List>? storedFileHash,
Expression<DateTime>? createdAt,
Expression<int>? rowid,
}) {
@ -2611,7 +2572,6 @@ class MediaFilesCompanion extends UpdateCompanion<MediaFile> {
if (encryptionKey != null) 'encryption_key': encryptionKey,
if (encryptionMac != null) 'encryption_mac': encryptionMac,
if (encryptionNonce != null) 'encryption_nonce': encryptionNonce,
if (storedFileHash != null) 'stored_file_hash': storedFileHash,
if (createdAt != null) 'created_at': createdAt,
if (rowid != null) 'rowid': rowid,
});
@ -2632,7 +2592,6 @@ class MediaFilesCompanion extends UpdateCompanion<MediaFile> {
Value<Uint8List?>? encryptionKey,
Value<Uint8List?>? encryptionMac,
Value<Uint8List?>? encryptionNonce,
Value<Uint8List?>? storedFileHash,
Value<DateTime>? createdAt,
Value<int>? rowid}) {
return MediaFilesCompanion(
@ -2652,7 +2611,6 @@ class MediaFilesCompanion extends UpdateCompanion<MediaFile> {
encryptionKey: encryptionKey ?? this.encryptionKey,
encryptionMac: encryptionMac ?? this.encryptionMac,
encryptionNonce: encryptionNonce ?? this.encryptionNonce,
storedFileHash: storedFileHash ?? this.storedFileHash,
createdAt: createdAt ?? this.createdAt,
rowid: rowid ?? this.rowid,
);
@ -2710,9 +2668,6 @@ class MediaFilesCompanion extends UpdateCompanion<MediaFile> {
if (encryptionNonce.present) {
map['encryption_nonce'] = Variable<Uint8List>(encryptionNonce.value);
}
if (storedFileHash.present) {
map['stored_file_hash'] = Variable<Uint8List>(storedFileHash.value);
}
if (createdAt.present) {
map['created_at'] = Variable<DateTime>(createdAt.value);
}
@ -2739,7 +2694,6 @@ class MediaFilesCompanion extends UpdateCompanion<MediaFile> {
..write('encryptionKey: $encryptionKey, ')
..write('encryptionMac: $encryptionMac, ')
..write('encryptionNonce: $encryptionNonce, ')
..write('storedFileHash: $storedFileHash, ')
..write('createdAt: $createdAt, ')
..write('rowid: $rowid')
..write(')'))
@ -4592,12 +4546,6 @@ class $ReceiptsTable extends Receipts with TableInfo<$ReceiptsTable, Receipt> {
defaultConstraints: GeneratedColumn.constraintIsAlways(
'CHECK ("contact_will_sends_receipt" IN (0, 1))'),
defaultValue: const Constant(true));
static const VerificationMeta _markForRetryMeta =
const VerificationMeta('markForRetry');
@override
late final GeneratedColumn<DateTime> markForRetry = GeneratedColumn<DateTime>(
'mark_for_retry', aliasedName, true,
type: DriftSqlType.dateTime, requiredDuringInsert: false);
static const VerificationMeta _ackByServerAtMeta =
const VerificationMeta('ackByServerAt');
@override
@ -4633,7 +4581,6 @@ class $ReceiptsTable extends Receipts with TableInfo<$ReceiptsTable, Receipt> {
messageId,
message,
contactWillSendsReceipt,
markForRetry,
ackByServerAt,
retryCount,
lastRetry,
@ -4678,12 +4625,6 @@ class $ReceiptsTable extends Receipts with TableInfo<$ReceiptsTable, Receipt> {
data['contact_will_sends_receipt']!,
_contactWillSendsReceiptMeta));
}
if (data.containsKey('mark_for_retry')) {
context.handle(
_markForRetryMeta,
markForRetry.isAcceptableOrUnknown(
data['mark_for_retry']!, _markForRetryMeta));
}
if (data.containsKey('ack_by_server_at')) {
context.handle(
_ackByServerAtMeta,
@ -4724,8 +4665,6 @@ class $ReceiptsTable extends Receipts with TableInfo<$ReceiptsTable, Receipt> {
contactWillSendsReceipt: attachedDatabase.typeMapping.read(
DriftSqlType.bool,
data['${effectivePrefix}contact_will_sends_receipt'])!,
markForRetry: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}mark_for_retry']),
ackByServerAt: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}ack_by_server_at']),
retryCount: attachedDatabase.typeMapping
@ -4751,7 +4690,6 @@ class Receipt extends DataClass implements Insertable<Receipt> {
/// This is the protobuf 'Message'
final Uint8List message;
final bool contactWillSendsReceipt;
final DateTime? markForRetry;
final DateTime? ackByServerAt;
final int retryCount;
final DateTime? lastRetry;
@ -4762,7 +4700,6 @@ class Receipt extends DataClass implements Insertable<Receipt> {
this.messageId,
required this.message,
required this.contactWillSendsReceipt,
this.markForRetry,
this.ackByServerAt,
required this.retryCount,
this.lastRetry,
@ -4777,9 +4714,6 @@ class Receipt extends DataClass implements Insertable<Receipt> {
}
map['message'] = Variable<Uint8List>(message);
map['contact_will_sends_receipt'] = Variable<bool>(contactWillSendsReceipt);
if (!nullToAbsent || markForRetry != null) {
map['mark_for_retry'] = Variable<DateTime>(markForRetry);
}
if (!nullToAbsent || ackByServerAt != null) {
map['ack_by_server_at'] = Variable<DateTime>(ackByServerAt);
}
@ -4800,9 +4734,6 @@ class Receipt extends DataClass implements Insertable<Receipt> {
: Value(messageId),
message: Value(message),
contactWillSendsReceipt: Value(contactWillSendsReceipt),
markForRetry: markForRetry == null && nullToAbsent
? const Value.absent()
: Value(markForRetry),
ackByServerAt: ackByServerAt == null && nullToAbsent
? const Value.absent()
: Value(ackByServerAt),
@ -4824,7 +4755,6 @@ class Receipt extends DataClass implements Insertable<Receipt> {
message: serializer.fromJson<Uint8List>(json['message']),
contactWillSendsReceipt:
serializer.fromJson<bool>(json['contactWillSendsReceipt']),
markForRetry: serializer.fromJson<DateTime?>(json['markForRetry']),
ackByServerAt: serializer.fromJson<DateTime?>(json['ackByServerAt']),
retryCount: serializer.fromJson<int>(json['retryCount']),
lastRetry: serializer.fromJson<DateTime?>(json['lastRetry']),
@ -4841,7 +4771,6 @@ class Receipt extends DataClass implements Insertable<Receipt> {
'message': serializer.toJson<Uint8List>(message),
'contactWillSendsReceipt':
serializer.toJson<bool>(contactWillSendsReceipt),
'markForRetry': serializer.toJson<DateTime?>(markForRetry),
'ackByServerAt': serializer.toJson<DateTime?>(ackByServerAt),
'retryCount': serializer.toJson<int>(retryCount),
'lastRetry': serializer.toJson<DateTime?>(lastRetry),
@ -4855,7 +4784,6 @@ class Receipt extends DataClass implements Insertable<Receipt> {
Value<String?> messageId = const Value.absent(),
Uint8List? message,
bool? contactWillSendsReceipt,
Value<DateTime?> markForRetry = const Value.absent(),
Value<DateTime?> ackByServerAt = const Value.absent(),
int? retryCount,
Value<DateTime?> lastRetry = const Value.absent(),
@ -4867,8 +4795,6 @@ class Receipt extends DataClass implements Insertable<Receipt> {
message: message ?? this.message,
contactWillSendsReceipt:
contactWillSendsReceipt ?? this.contactWillSendsReceipt,
markForRetry:
markForRetry.present ? markForRetry.value : this.markForRetry,
ackByServerAt:
ackByServerAt.present ? ackByServerAt.value : this.ackByServerAt,
retryCount: retryCount ?? this.retryCount,
@ -4884,9 +4810,6 @@ class Receipt extends DataClass implements Insertable<Receipt> {
contactWillSendsReceipt: data.contactWillSendsReceipt.present
? data.contactWillSendsReceipt.value
: this.contactWillSendsReceipt,
markForRetry: data.markForRetry.present
? data.markForRetry.value
: this.markForRetry,
ackByServerAt: data.ackByServerAt.present
? data.ackByServerAt.value
: this.ackByServerAt,
@ -4905,7 +4828,6 @@ class Receipt extends DataClass implements Insertable<Receipt> {
..write('messageId: $messageId, ')
..write('message: $message, ')
..write('contactWillSendsReceipt: $contactWillSendsReceipt, ')
..write('markForRetry: $markForRetry, ')
..write('ackByServerAt: $ackByServerAt, ')
..write('retryCount: $retryCount, ')
..write('lastRetry: $lastRetry, ')
@ -4921,7 +4843,6 @@ class Receipt extends DataClass implements Insertable<Receipt> {
messageId,
$driftBlobEquality.hash(message),
contactWillSendsReceipt,
markForRetry,
ackByServerAt,
retryCount,
lastRetry,
@ -4935,7 +4856,6 @@ class Receipt extends DataClass implements Insertable<Receipt> {
other.messageId == this.messageId &&
$driftBlobEquality.equals(other.message, this.message) &&
other.contactWillSendsReceipt == this.contactWillSendsReceipt &&
other.markForRetry == this.markForRetry &&
other.ackByServerAt == this.ackByServerAt &&
other.retryCount == this.retryCount &&
other.lastRetry == this.lastRetry &&
@ -4948,7 +4868,6 @@ class ReceiptsCompanion extends UpdateCompanion<Receipt> {
final Value<String?> messageId;
final Value<Uint8List> message;
final Value<bool> contactWillSendsReceipt;
final Value<DateTime?> markForRetry;
final Value<DateTime?> ackByServerAt;
final Value<int> retryCount;
final Value<DateTime?> lastRetry;
@ -4960,7 +4879,6 @@ class ReceiptsCompanion extends UpdateCompanion<Receipt> {
this.messageId = const Value.absent(),
this.message = const Value.absent(),
this.contactWillSendsReceipt = const Value.absent(),
this.markForRetry = const Value.absent(),
this.ackByServerAt = const Value.absent(),
this.retryCount = const Value.absent(),
this.lastRetry = const Value.absent(),
@ -4973,7 +4891,6 @@ class ReceiptsCompanion extends UpdateCompanion<Receipt> {
this.messageId = const Value.absent(),
required Uint8List message,
this.contactWillSendsReceipt = const Value.absent(),
this.markForRetry = const Value.absent(),
this.ackByServerAt = const Value.absent(),
this.retryCount = const Value.absent(),
this.lastRetry = const Value.absent(),
@ -4988,7 +4905,6 @@ class ReceiptsCompanion extends UpdateCompanion<Receipt> {
Expression<String>? messageId,
Expression<Uint8List>? message,
Expression<bool>? contactWillSendsReceipt,
Expression<DateTime>? markForRetry,
Expression<DateTime>? ackByServerAt,
Expression<int>? retryCount,
Expression<DateTime>? lastRetry,
@ -5002,7 +4918,6 @@ class ReceiptsCompanion extends UpdateCompanion<Receipt> {
if (message != null) 'message': message,
if (contactWillSendsReceipt != null)
'contact_will_sends_receipt': contactWillSendsReceipt,
if (markForRetry != null) 'mark_for_retry': markForRetry,
if (ackByServerAt != null) 'ack_by_server_at': ackByServerAt,
if (retryCount != null) 'retry_count': retryCount,
if (lastRetry != null) 'last_retry': lastRetry,
@ -5017,7 +4932,6 @@ class ReceiptsCompanion extends UpdateCompanion<Receipt> {
Value<String?>? messageId,
Value<Uint8List>? message,
Value<bool>? contactWillSendsReceipt,
Value<DateTime?>? markForRetry,
Value<DateTime?>? ackByServerAt,
Value<int>? retryCount,
Value<DateTime?>? lastRetry,
@ -5030,7 +4944,6 @@ class ReceiptsCompanion extends UpdateCompanion<Receipt> {
message: message ?? this.message,
contactWillSendsReceipt:
contactWillSendsReceipt ?? this.contactWillSendsReceipt,
markForRetry: markForRetry ?? this.markForRetry,
ackByServerAt: ackByServerAt ?? this.ackByServerAt,
retryCount: retryCount ?? this.retryCount,
lastRetry: lastRetry ?? this.lastRetry,
@ -5058,9 +4971,6 @@ class ReceiptsCompanion extends UpdateCompanion<Receipt> {
map['contact_will_sends_receipt'] =
Variable<bool>(contactWillSendsReceipt.value);
}
if (markForRetry.present) {
map['mark_for_retry'] = Variable<DateTime>(markForRetry.value);
}
if (ackByServerAt.present) {
map['ack_by_server_at'] = Variable<DateTime>(ackByServerAt.value);
}
@ -5087,7 +4997,6 @@ class ReceiptsCompanion extends UpdateCompanion<Receipt> {
..write('messageId: $messageId, ')
..write('message: $message, ')
..write('contactWillSendsReceipt: $contactWillSendsReceipt, ')
..write('markForRetry: $markForRetry, ')
..write('ackByServerAt: $ackByServerAt, ')
..write('retryCount: $retryCount, ')
..write('lastRetry: $lastRetry, ')
@ -9436,7 +9345,6 @@ typedef $$MediaFilesTableCreateCompanionBuilder = MediaFilesCompanion Function({
Value<Uint8List?> encryptionKey,
Value<Uint8List?> encryptionMac,
Value<Uint8List?> encryptionNonce,
Value<Uint8List?> storedFileHash,
Value<DateTime> createdAt,
Value<int> rowid,
});
@ -9455,7 +9363,6 @@ typedef $$MediaFilesTableUpdateCompanionBuilder = MediaFilesCompanion Function({
Value<Uint8List?> encryptionKey,
Value<Uint8List?> encryptionMac,
Value<Uint8List?> encryptionNonce,
Value<Uint8List?> storedFileHash,
Value<DateTime> createdAt,
Value<int> rowid,
});
@ -9542,10 +9449,6 @@ class $$MediaFilesTableFilterComposer
column: $table.encryptionNonce,
builder: (column) => ColumnFilters(column));
ColumnFilters<Uint8List> get storedFileHash => $composableBuilder(
column: $table.storedFileHash,
builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get createdAt => $composableBuilder(
column: $table.createdAt, builder: (column) => ColumnFilters(column));
@ -9631,10 +9534,6 @@ class $$MediaFilesTableOrderingComposer
column: $table.encryptionNonce,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<Uint8List> get storedFileHash => $composableBuilder(
column: $table.storedFileHash,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get createdAt => $composableBuilder(
column: $table.createdAt, builder: (column) => ColumnOrderings(column));
}
@ -9693,9 +9592,6 @@ class $$MediaFilesTableAnnotationComposer
GeneratedColumn<Uint8List> get encryptionNonce => $composableBuilder(
column: $table.encryptionNonce, builder: (column) => column);
GeneratedColumn<Uint8List> get storedFileHash => $composableBuilder(
column: $table.storedFileHash, builder: (column) => column);
GeneratedColumn<DateTime> get createdAt =>
$composableBuilder(column: $table.createdAt, builder: (column) => column);
@ -9758,7 +9654,6 @@ class $$MediaFilesTableTableManager extends RootTableManager<
Value<Uint8List?> encryptionKey = const Value.absent(),
Value<Uint8List?> encryptionMac = const Value.absent(),
Value<Uint8List?> encryptionNonce = const Value.absent(),
Value<Uint8List?> storedFileHash = const Value.absent(),
Value<DateTime> createdAt = const Value.absent(),
Value<int> rowid = const Value.absent(),
}) =>
@ -9777,7 +9672,6 @@ class $$MediaFilesTableTableManager extends RootTableManager<
encryptionKey: encryptionKey,
encryptionMac: encryptionMac,
encryptionNonce: encryptionNonce,
storedFileHash: storedFileHash,
createdAt: createdAt,
rowid: rowid,
),
@ -9796,7 +9690,6 @@ class $$MediaFilesTableTableManager extends RootTableManager<
Value<Uint8List?> encryptionKey = const Value.absent(),
Value<Uint8List?> encryptionMac = const Value.absent(),
Value<Uint8List?> encryptionNonce = const Value.absent(),
Value<Uint8List?> storedFileHash = const Value.absent(),
Value<DateTime> createdAt = const Value.absent(),
Value<int> rowid = const Value.absent(),
}) =>
@ -9815,7 +9708,6 @@ class $$MediaFilesTableTableManager extends RootTableManager<
encryptionKey: encryptionKey,
encryptionMac: encryptionMac,
encryptionNonce: encryptionNonce,
storedFileHash: storedFileHash,
createdAt: createdAt,
rowid: rowid,
),
@ -11770,7 +11662,6 @@ typedef $$ReceiptsTableCreateCompanionBuilder = ReceiptsCompanion Function({
Value<String?> messageId,
required Uint8List message,
Value<bool> contactWillSendsReceipt,
Value<DateTime?> markForRetry,
Value<DateTime?> ackByServerAt,
Value<int> retryCount,
Value<DateTime?> lastRetry,
@ -11783,7 +11674,6 @@ typedef $$ReceiptsTableUpdateCompanionBuilder = ReceiptsCompanion Function({
Value<String?> messageId,
Value<Uint8List> message,
Value<bool> contactWillSendsReceipt,
Value<DateTime?> markForRetry,
Value<DateTime?> ackByServerAt,
Value<int> retryCount,
Value<DateTime?> lastRetry,
@ -11845,9 +11735,6 @@ class $$ReceiptsTableFilterComposer
column: $table.contactWillSendsReceipt,
builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get markForRetry => $composableBuilder(
column: $table.markForRetry, builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get ackByServerAt => $composableBuilder(
column: $table.ackByServerAt, builder: (column) => ColumnFilters(column));
@ -11920,10 +11807,6 @@ class $$ReceiptsTableOrderingComposer
column: $table.contactWillSendsReceipt,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get markForRetry => $composableBuilder(
column: $table.markForRetry,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get ackByServerAt => $composableBuilder(
column: $table.ackByServerAt,
builder: (column) => ColumnOrderings(column));
@ -11996,9 +11879,6 @@ class $$ReceiptsTableAnnotationComposer
GeneratedColumn<bool> get contactWillSendsReceipt => $composableBuilder(
column: $table.contactWillSendsReceipt, builder: (column) => column);
GeneratedColumn<DateTime> get markForRetry => $composableBuilder(
column: $table.markForRetry, builder: (column) => column);
GeneratedColumn<DateTime> get ackByServerAt => $composableBuilder(
column: $table.ackByServerAt, builder: (column) => column);
@ -12080,7 +11960,6 @@ class $$ReceiptsTableTableManager extends RootTableManager<
Value<String?> messageId = const Value.absent(),
Value<Uint8List> message = const Value.absent(),
Value<bool> contactWillSendsReceipt = const Value.absent(),
Value<DateTime?> markForRetry = const Value.absent(),
Value<DateTime?> ackByServerAt = const Value.absent(),
Value<int> retryCount = const Value.absent(),
Value<DateTime?> lastRetry = const Value.absent(),
@ -12093,7 +11972,6 @@ class $$ReceiptsTableTableManager extends RootTableManager<
messageId: messageId,
message: message,
contactWillSendsReceipt: contactWillSendsReceipt,
markForRetry: markForRetry,
ackByServerAt: ackByServerAt,
retryCount: retryCount,
lastRetry: lastRetry,
@ -12106,7 +11984,6 @@ class $$ReceiptsTableTableManager extends RootTableManager<
Value<String?> messageId = const Value.absent(),
required Uint8List message,
Value<bool> contactWillSendsReceipt = const Value.absent(),
Value<DateTime?> markForRetry = const Value.absent(),
Value<DateTime?> ackByServerAt = const Value.absent(),
Value<int> retryCount = const Value.absent(),
Value<DateTime?> lastRetry = const Value.absent(),
@ -12119,7 +11996,6 @@ class $$ReceiptsTableTableManager extends RootTableManager<
messageId: messageId,
message: message,
contactWillSendsReceipt: contactWillSendsReceipt,
markForRetry: markForRetry,
ackByServerAt: ackByServerAt,
retryCount: retryCount,
lastRetry: lastRetry,

View file

@ -1946,458 +1946,10 @@ final class Schema4 extends i0.VersionedSchema {
i1.GeneratedColumn<int> _column_101(String aliasedName) =>
i1.GeneratedColumn<int>('affected_contact_id', aliasedName, true,
type: i1.DriftSqlType.int);
final class Schema5 extends i0.VersionedSchema {
Schema5({required super.database}) : super(version: 5);
@override
late final List<i1.DatabaseSchemaEntity> entities = [
contacts,
groups,
mediaFiles,
messages,
messageHistories,
reactions,
groupMembers,
receipts,
receivedReceipts,
signalIdentityKeyStores,
signalPreKeyStores,
signalSenderKeyStores,
signalSessionStores,
signalContactPreKeys,
signalContactSignedPreKeys,
messageActions,
groupHistories,
];
late final Shape0 contacts = Shape0(
source: i0.VersionedTable(
entityName: 'contacts',
withoutRowId: false,
isStrict: false,
tableConstraints: [
'PRIMARY KEY(user_id)',
],
columns: [
_column_0,
_column_1,
_column_2,
_column_3,
_column_4,
_column_5,
_column_6,
_column_7,
_column_8,
_column_9,
_column_10,
_column_11,
_column_12,
],
attachedDatabase: database,
),
alias: null);
late final Shape17 groups = Shape17(
source: i0.VersionedTable(
entityName: 'groups',
withoutRowId: false,
isStrict: false,
tableConstraints: [
'PRIMARY KEY(group_id)',
],
columns: [
_column_13,
_column_14,
_column_15,
_column_16,
_column_17,
_column_18,
_column_19,
_column_20,
_column_21,
_column_22,
_column_23,
_column_24,
_column_100,
_column_25,
_column_26,
_column_27,
_column_12,
_column_28,
_column_29,
_column_30,
_column_31,
_column_32,
_column_33,
_column_34,
_column_35,
],
attachedDatabase: database,
),
alias: null);
late final Shape18 mediaFiles = Shape18(
source: i0.VersionedTable(
entityName: 'media_files',
withoutRowId: false,
isStrict: false,
tableConstraints: [
'PRIMARY KEY(media_id)',
],
columns: [
_column_36,
_column_37,
_column_38,
_column_39,
_column_40,
_column_41,
_column_42,
_column_43,
_column_44,
_column_45,
_column_46,
_column_47,
_column_48,
_column_49,
_column_102,
_column_12,
],
attachedDatabase: database,
),
alias: null);
late final Shape3 messages = Shape3(
source: i0.VersionedTable(
entityName: 'messages',
withoutRowId: false,
isStrict: false,
tableConstraints: [
'PRIMARY KEY(message_id)',
],
columns: [
_column_50,
_column_51,
_column_52,
_column_37,
_column_53,
_column_54,
_column_55,
_column_56,
_column_46,
_column_57,
_column_58,
_column_59,
_column_60,
_column_12,
_column_61,
_column_62,
_column_63,
],
attachedDatabase: database,
),
alias: null);
late final Shape4 messageHistories = Shape4(
source: i0.VersionedTable(
entityName: 'message_histories',
withoutRowId: false,
isStrict: false,
tableConstraints: [
'PRIMARY KEY(id)',
],
columns: [
_column_64,
_column_65,
_column_66,
_column_53,
_column_12,
],
attachedDatabase: database,
),
alias: null);
late final Shape5 reactions = Shape5(
source: i0.VersionedTable(
entityName: 'reactions',
withoutRowId: false,
isStrict: false,
tableConstraints: [
'PRIMARY KEY(message_id, sender_id, emoji)',
],
columns: [
_column_65,
_column_67,
_column_68,
_column_12,
],
attachedDatabase: database,
),
alias: null);
late final Shape6 groupMembers = Shape6(
source: i0.VersionedTable(
entityName: 'group_members',
withoutRowId: false,
isStrict: false,
tableConstraints: [
'PRIMARY KEY(group_id, contact_id)',
],
columns: [
_column_50,
_column_69,
_column_70,
_column_71,
_column_72,
_column_12,
],
attachedDatabase: database,
),
alias: null);
late final Shape19 receipts = Shape19(
source: i0.VersionedTable(
entityName: 'receipts',
withoutRowId: false,
isStrict: false,
tableConstraints: [
'PRIMARY KEY(receipt_id)',
],
columns: [
_column_73,
_column_74,
_column_75,
_column_76,
_column_77,
_column_103,
_column_78,
_column_79,
_column_80,
_column_12,
],
attachedDatabase: database,
),
alias: null);
late final Shape8 receivedReceipts = Shape8(
source: i0.VersionedTable(
entityName: 'received_receipts',
withoutRowId: false,
isStrict: false,
tableConstraints: [
'PRIMARY KEY(receipt_id)',
],
columns: [
_column_73,
_column_12,
],
attachedDatabase: database,
),
alias: null);
late final Shape9 signalIdentityKeyStores = Shape9(
source: i0.VersionedTable(
entityName: 'signal_identity_key_stores',
withoutRowId: false,
isStrict: false,
tableConstraints: [
'PRIMARY KEY(device_id, name)',
],
columns: [
_column_81,
_column_82,
_column_83,
_column_12,
],
attachedDatabase: database,
),
alias: null);
late final Shape10 signalPreKeyStores = Shape10(
source: i0.VersionedTable(
entityName: 'signal_pre_key_stores',
withoutRowId: false,
isStrict: false,
tableConstraints: [
'PRIMARY KEY(pre_key_id)',
],
columns: [
_column_84,
_column_85,
_column_12,
],
attachedDatabase: database,
),
alias: null);
late final Shape11 signalSenderKeyStores = Shape11(
source: i0.VersionedTable(
entityName: 'signal_sender_key_stores',
withoutRowId: false,
isStrict: false,
tableConstraints: [
'PRIMARY KEY(sender_key_name)',
],
columns: [
_column_86,
_column_87,
],
attachedDatabase: database,
),
alias: null);
late final Shape12 signalSessionStores = Shape12(
source: i0.VersionedTable(
entityName: 'signal_session_stores',
withoutRowId: false,
isStrict: false,
tableConstraints: [
'PRIMARY KEY(device_id, name)',
],
columns: [
_column_81,
_column_82,
_column_88,
_column_12,
],
attachedDatabase: database,
),
alias: null);
late final Shape13 signalContactPreKeys = Shape13(
source: i0.VersionedTable(
entityName: 'signal_contact_pre_keys',
withoutRowId: false,
isStrict: false,
tableConstraints: [
'PRIMARY KEY(contact_id, pre_key_id)',
],
columns: [
_column_74,
_column_84,
_column_85,
_column_12,
],
attachedDatabase: database,
),
alias: null);
late final Shape14 signalContactSignedPreKeys = Shape14(
source: i0.VersionedTable(
entityName: 'signal_contact_signed_pre_keys',
withoutRowId: false,
isStrict: false,
tableConstraints: [
'PRIMARY KEY(contact_id)',
],
columns: [
_column_74,
_column_89,
_column_90,
_column_91,
_column_12,
],
attachedDatabase: database,
),
alias: null);
late final Shape15 messageActions = Shape15(
source: i0.VersionedTable(
entityName: 'message_actions',
withoutRowId: false,
isStrict: false,
tableConstraints: [
'PRIMARY KEY(message_id, contact_id, type)',
],
columns: [
_column_65,
_column_92,
_column_37,
_column_93,
],
attachedDatabase: database,
),
alias: null);
late final Shape16 groupHistories = Shape16(
source: i0.VersionedTable(
entityName: 'group_histories',
withoutRowId: false,
isStrict: false,
tableConstraints: [
'PRIMARY KEY(group_history_id)',
],
columns: [
_column_94,
_column_50,
_column_95,
_column_101,
_column_97,
_column_98,
_column_99,
_column_37,
_column_93,
],
attachedDatabase: database,
),
alias: null);
}
class Shape18 extends i0.VersionedTable {
Shape18({required super.source, required super.alias}) : super.aliased();
i1.GeneratedColumn<String> get mediaId =>
columnsByName['media_id']! as i1.GeneratedColumn<String>;
i1.GeneratedColumn<String> get type =>
columnsByName['type']! as i1.GeneratedColumn<String>;
i1.GeneratedColumn<String> get uploadState =>
columnsByName['upload_state']! as i1.GeneratedColumn<String>;
i1.GeneratedColumn<String> get downloadState =>
columnsByName['download_state']! as i1.GeneratedColumn<String>;
i1.GeneratedColumn<bool> get requiresAuthentication =>
columnsByName['requires_authentication']! as i1.GeneratedColumn<bool>;
i1.GeneratedColumn<bool> get stored =>
columnsByName['stored']! as i1.GeneratedColumn<bool>;
i1.GeneratedColumn<bool> get isDraftMedia =>
columnsByName['is_draft_media']! as i1.GeneratedColumn<bool>;
i1.GeneratedColumn<String> get reuploadRequestedBy =>
columnsByName['reupload_requested_by']! as i1.GeneratedColumn<String>;
i1.GeneratedColumn<int> get displayLimitInMilliseconds =>
columnsByName['display_limit_in_milliseconds']!
as i1.GeneratedColumn<int>;
i1.GeneratedColumn<bool> get removeAudio =>
columnsByName['remove_audio']! as i1.GeneratedColumn<bool>;
i1.GeneratedColumn<i2.Uint8List> get downloadToken =>
columnsByName['download_token']! as i1.GeneratedColumn<i2.Uint8List>;
i1.GeneratedColumn<i2.Uint8List> get encryptionKey =>
columnsByName['encryption_key']! as i1.GeneratedColumn<i2.Uint8List>;
i1.GeneratedColumn<i2.Uint8List> get encryptionMac =>
columnsByName['encryption_mac']! as i1.GeneratedColumn<i2.Uint8List>;
i1.GeneratedColumn<i2.Uint8List> get encryptionNonce =>
columnsByName['encryption_nonce']! as i1.GeneratedColumn<i2.Uint8List>;
i1.GeneratedColumn<i2.Uint8List> get storedFileHash =>
columnsByName['stored_file_hash']! as i1.GeneratedColumn<i2.Uint8List>;
i1.GeneratedColumn<DateTime> get createdAt =>
columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
}
i1.GeneratedColumn<i2.Uint8List> _column_102(String aliasedName) =>
i1.GeneratedColumn<i2.Uint8List>('stored_file_hash', aliasedName, true,
type: i1.DriftSqlType.blob);
class Shape19 extends i0.VersionedTable {
Shape19({required super.source, required super.alias}) : super.aliased();
i1.GeneratedColumn<String> get receiptId =>
columnsByName['receipt_id']! as i1.GeneratedColumn<String>;
i1.GeneratedColumn<int> get contactId =>
columnsByName['contact_id']! as i1.GeneratedColumn<int>;
i1.GeneratedColumn<String> get messageId =>
columnsByName['message_id']! as i1.GeneratedColumn<String>;
i1.GeneratedColumn<i2.Uint8List> get message =>
columnsByName['message']! as i1.GeneratedColumn<i2.Uint8List>;
i1.GeneratedColumn<bool> get contactWillSendsReceipt =>
columnsByName['contact_will_sends_receipt']! as i1.GeneratedColumn<bool>;
i1.GeneratedColumn<DateTime> get markForRetry =>
columnsByName['mark_for_retry']! as i1.GeneratedColumn<DateTime>;
i1.GeneratedColumn<DateTime> get ackByServerAt =>
columnsByName['ack_by_server_at']! as i1.GeneratedColumn<DateTime>;
i1.GeneratedColumn<int> get retryCount =>
columnsByName['retry_count']! as i1.GeneratedColumn<int>;
i1.GeneratedColumn<DateTime> get lastRetry =>
columnsByName['last_retry']! as i1.GeneratedColumn<DateTime>;
i1.GeneratedColumn<DateTime> get createdAt =>
columnsByName['created_at']! as i1.GeneratedColumn<DateTime>;
}
i1.GeneratedColumn<DateTime> _column_103(String aliasedName) =>
i1.GeneratedColumn<DateTime>('mark_for_retry', aliasedName, true,
type: i1.DriftSqlType.dateTime);
i0.MigrationStepWithVersion migrationSteps({
required Future<void> Function(i1.Migrator m, Schema2 schema) from1To2,
required Future<void> Function(i1.Migrator m, Schema3 schema) from2To3,
required Future<void> Function(i1.Migrator m, Schema4 schema) from3To4,
required Future<void> Function(i1.Migrator m, Schema5 schema) from4To5,
}) {
return (currentVersion, database) async {
switch (currentVersion) {
@ -2416,11 +1968,6 @@ i0.MigrationStepWithVersion migrationSteps({
final migrator = i1.Migrator(database, schema);
await from3To4(migrator, schema);
return 4;
case 4:
final schema = Schema5(database: database);
final migrator = i1.Migrator(database, schema);
await from4To5(migrator, schema);
return 5;
default:
throw ArgumentError.value('Unknown migration from $currentVersion');
}
@ -2431,12 +1978,10 @@ i1.OnUpgrade stepByStep({
required Future<void> Function(i1.Migrator m, Schema2 schema) from1To2,
required Future<void> Function(i1.Migrator m, Schema3 schema) from2To3,
required Future<void> Function(i1.Migrator m, Schema4 schema) from3To4,
required Future<void> Function(i1.Migrator m, Schema5 schema) from4To5,
}) =>
i0.VersionedSchema.stepByStepHelper(
step: migrationSteps(
from1To2: from1To2,
from2To3: from2To3,
from3To4: from3To4,
from4To5: from4To5,
));

View file

@ -461,8 +461,5 @@
"showImagePreviewWhenSending": "Bildvorschau bei der Auswahl von Empfängern anzeigen",
"verifiedPublicKey": "Der öffentliche Schlüssel von {username} wurde überprüft und ist gültig.",
"memoriesAYearAgo": "Vor einem Jahr",
"memoriesXYearsAgo": "Vor {years} Jahren",
"migrationOfMemories": "Migration von Mediendateien: {open} noch offen.",
"autoStoreAllSendUnlimitedMediaFiles": "Alle gesendeten Medien speichern",
"autoStoreAllSendUnlimitedMediaFilesSubtitle": "Wenn du diese Option aktivierst, werden alle Bilder, die du sendest, gespeichert, sofern sie mit einem unendlichen Countdown und nicht im twonly-Modus gesendet wurden."
"memoriesXYearsAgo": "Vor {years} Jahren"
}

View file

@ -491,8 +491,5 @@
"showImagePreviewWhenSending": "Display image preview when selecting recipients",
"verifiedPublicKey": "The public key of {username} has been verified and is valid.",
"memoriesAYearAgo": "One year ago",
"memoriesXYearsAgo": "{years} years ago",
"migrationOfMemories": "Migration of media files: {open} still to be processed.",
"autoStoreAllSendUnlimitedMediaFiles": "Save all sent media",
"autoStoreAllSendUnlimitedMediaFilesSubtitle": "If you enable this option, all images you send will be saved as long as they were sent with an infinite countdown and not in twonly mode."
"memoriesXYearsAgo": "{years} years ago"
}

View file

@ -2869,24 +2869,6 @@ abstract class AppLocalizations {
/// In en, this message translates to:
/// **'{years} years ago'**
String memoriesXYearsAgo(Object years);
/// No description provided for @migrationOfMemories.
///
/// In en, this message translates to:
/// **'Migration of media files: {open} still to be processed.'**
String migrationOfMemories(Object open);
/// No description provided for @autoStoreAllSendUnlimitedMediaFiles.
///
/// In en, this message translates to:
/// **'Save all sent media'**
String get autoStoreAllSendUnlimitedMediaFiles;
/// No description provided for @autoStoreAllSendUnlimitedMediaFilesSubtitle.
///
/// In en, this message translates to:
/// **'If you enable this option, all images you send will be saved as long as they were sent with an infinite countdown and not in twonly mode.'**
String get autoStoreAllSendUnlimitedMediaFilesSubtitle;
}
class _AppLocalizationsDelegate

View file

@ -1590,17 +1590,4 @@ class AppLocalizationsDe extends AppLocalizations {
String memoriesXYearsAgo(Object years) {
return 'Vor $years Jahren';
}
@override
String migrationOfMemories(Object open) {
return 'Migration von Mediendateien: $open noch offen.';
}
@override
String get autoStoreAllSendUnlimitedMediaFiles =>
'Alle gesendeten Medien speichern';
@override
String get autoStoreAllSendUnlimitedMediaFilesSubtitle =>
'Wenn du diese Option aktivierst, werden alle Bilder, die du sendest, gespeichert, sofern sie mit einem unendlichen Countdown und nicht im twonly-Modus gesendet wurden.';
}

View file

@ -1580,16 +1580,4 @@ class AppLocalizationsEn extends AppLocalizations {
String memoriesXYearsAgo(Object years) {
return '$years years ago';
}
@override
String migrationOfMemories(Object open) {
return 'Migration of media files: $open still to be processed.';
}
@override
String get autoStoreAllSendUnlimitedMediaFiles => 'Save all sent media';
@override
String get autoStoreAllSendUnlimitedMediaFilesSubtitle =>
'If you enable this option, all images you send will be saved as long as they were sent with an infinite countdown and not in twonly mode.';
}

View file

@ -59,8 +59,8 @@ class UserData {
@JsonKey(defaultValue: true)
bool showFeedbackShortcut = true;
@JsonKey(defaultValue: false)
bool showShowImagePreviewWhenSending = false;
@JsonKey(defaultValue: true)
bool showShowImagePreviewWhenSending = true;
@JsonKey(defaultValue: true)
bool startWithCameraOpen = true;
@ -72,9 +72,6 @@ class UserData {
@JsonKey(defaultValue: false)
bool storeMediaFilesInGallery = false;
@JsonKey(defaultValue: false)
bool autoStoreAllSendUnlimitedMediaFiles = false;
String? lastPlanBallance;
String? additionalUserInvites;

View file

@ -33,7 +33,7 @@ UserData _$UserDataFromJson(Map<String, dynamic> json) => UserData(
json['requestedAudioPermission'] as bool? ?? false
..showFeedbackShortcut = json['showFeedbackShortcut'] as bool? ?? true
..showShowImagePreviewWhenSending =
json['showShowImagePreviewWhenSending'] as bool? ?? false
json['showShowImagePreviewWhenSending'] as bool? ?? true
..startWithCameraOpen = json['startWithCameraOpen'] as bool? ?? true
..preSelectedEmojies = (json['preSelectedEmojies'] as List<dynamic>?)
?.map((e) => e as String)
@ -45,8 +45,6 @@ UserData _$UserDataFromJson(Map<String, dynamic> json) => UserData(
)
..storeMediaFilesInGallery =
json['storeMediaFilesInGallery'] as bool? ?? false
..autoStoreAllSendUnlimitedMediaFiles =
json['autoStoreAllSendUnlimitedMediaFiles'] as bool? ?? false
..lastPlanBallance = json['lastPlanBallance'] as String?
..additionalUserInvites = json['additionalUserInvites'] as String?
..tutorialDisplayed = (json['tutorialDisplayed'] as List<dynamic>?)
@ -104,8 +102,6 @@ Map<String, dynamic> _$UserDataToJson(UserData instance) => <String, dynamic>{
'preSelectedEmojies': instance.preSelectedEmojies,
'autoDownloadOptions': instance.autoDownloadOptions,
'storeMediaFilesInGallery': instance.storeMediaFilesInGallery,
'autoStoreAllSendUnlimitedMediaFiles':
instance.autoStoreAllSendUnlimitedMediaFiles,
'lastPlanBallance': instance.lastPlanBallance,
'additionalUserInvites': instance.additionalUserInvites,
'tutorialDisplayed': instance.tutorialDisplayed,

View file

@ -93,7 +93,7 @@ Future<void> handleContactUpdate(
switch (contactUpdate.type) {
case EncryptedContent_ContactUpdate_Type.REQUEST:
Log.info('Got a contact update request from $fromUserId');
await sendContactMyProfileData(fromUserId);
await notifyContactsAboutProfileChange(onlyToContact: fromUserId);
case EncryptedContent_ContactUpdate_Type.UPDATE:
Log.info('Got a contact update $fromUserId');

View file

@ -87,6 +87,7 @@ Future<MediaFileService?> initializeMediaUpload(
Future<void> insertMediaFileInMessagesTable(
MediaFileService mediaService,
List<String> groupIds,
Future<Uint8List?>? imageStoreAwait,
) async {
await twonlyDB.mediaFilesDao.updateAllMediaFiles(
const MediaFilesCompanion(
@ -117,6 +118,13 @@ Future<void> insertMediaFileInMessagesTable(
}
}
if (imageStoreAwait != null) {
if (await imageStoreAwait == null) {
Log.error('image store as original did return false...');
return;
}
}
unawaited(startBackgroundMediaUpload(mediaService));
}
@ -132,15 +140,6 @@ Future<void> startBackgroundMediaUpload(MediaFileService mediaService) async {
}
}
// if the user has enabled auto storing and the file
// was send with unlimited counter not in twonly-Mode then store the file
if (gUser.autoStoreAllSendUnlimitedMediaFiles &&
!mediaService.mediaFile.requiresAuthentication &&
!mediaService.storedPath.existsSync() &&
mediaService.mediaFile.displayLimitInMilliseconds == null) {
await mediaService.storeMediaFile();
}
if (!mediaService.encryptedPath.existsSync()) {
await _encryptMediaFiles(mediaService);
if (!mediaService.encryptedPath.existsSync()) {

View file

@ -21,7 +21,7 @@ final lockRetransmission = Mutex();
Future<void> tryTransmitMessages() async {
return lockRetransmission.protect(() async {
final receipts = await twonlyDB.receiptsDao.getReceiptsForRetransmission();
final receipts = await twonlyDB.receiptsDao.getReceiptsNotAckByServer();
if (receipts.isEmpty) return;
@ -289,18 +289,26 @@ Future<void> notifyContactAboutOpeningMessage(
await updateLastMessageId(contactId, biggestMessageId);
}
Future<void> sendContactMyProfileData(int contactId) async {
List<int>? avatarSvgCompressed;
if (gUser.avatarSvg != null) {
avatarSvgCompressed = gzip.encode(utf8.encode(gUser.avatarSvg!));
}
Future<void> notifyContactsAboutProfileChange({int? onlyToContact}) async {
if (gUser.avatarSvg == null) return;
final encryptedContent = pb.EncryptedContent(
contactUpdate: pb.EncryptedContent_ContactUpdate(
type: pb.EncryptedContent_ContactUpdate_Type.UPDATE,
avatarSvgCompressed: avatarSvgCompressed,
avatarSvgCompressed: gzip.encode(utf8.encode(gUser.avatarSvg!)),
displayName: gUser.displayName,
username: gUser.username,
),
);
await sendCipherText(contactId, encryptedContent);
if (onlyToContact != null) {
await sendCipherText(onlyToContact, encryptedContent);
return;
}
final contacts = await twonlyDB.contactsDao.getAllNotBlockedContacts();
for (final contact in contacts) {
await sendCipherText(contact.userId, encryptedContent);
}
}

View file

@ -40,11 +40,7 @@ Future<void> handleServerMessage(server.ServerToClient msg) async {
await handleClient2ClientMessage(msg.v0.newMessage);
} else if (msg.v0.hasNewMessages()) {
for (final newMessage in msg.v0.newMessages.newMessages) {
try {
await handleClient2ClientMessage(newMessage);
} catch (e) {
Log.error(e);
}
await handleClient2ClientMessage(newMessage);
}
} else {
Log.error('Unknown server message: $msg');
@ -189,15 +185,6 @@ Future<PlaintextContent?> handleEncryptedMessage(
..type = decryptionErrorType!);
}
// We got a valid message fromUserId, so mark all messages which where
// send to the user but not yet ACK for retransmission. All marked messages
// will be either transmitted again after a new server connection (minimum 20 seconds).
// In case the server sends the ACK before they will be deleted.
// This ensures that 1. all messages will be received by the other person and
// that they will be retransmitted in case the server deleted them as they
// where not downloaded within the 40 days
await twonlyDB.receiptsDao.markMessagesForRetry(fromUserId);
final senderProfileCounter = await checkForProfileUpdate(fromUserId, content);
if (content.hasContactRequest()) {

View file

@ -8,7 +8,6 @@ import 'package:twonly/src/database/twonly.db.dart';
import 'package:twonly/src/services/mediafiles/compression.service.dart';
import 'package:twonly/src/services/mediafiles/thumbnail.service.dart';
import 'package:twonly/src/utils/log.dart';
import 'package:twonly/src/utils/misc.dart';
class MediaFileService {
MediaFileService(this.mediaFile);
@ -224,22 +223,6 @@ class MediaFileService {
);
}
unawaited(createThumbnail());
await hashStoredMedia();
// updateFromDb is done in hashStoredMedia()
}
Future<void> hashStoredMedia() async {
if (!storedPath.existsSync()) {
Log.error('could not create hash value as media file is not stored.');
return;
}
final checksum = await sha256File(storedPath);
await twonlyDB.mediaFilesDao.updateMedia(
mediaFile.mediaId,
MediaFilesCompanion(
storedFileHash: Value(Uint8List.fromList(checksum)),
),
);
await updateFromDB();
}

View file

@ -1,8 +1,6 @@
import 'dart:convert';
import 'dart:io';
import 'dart:math';
import 'package:convert/convert.dart';
import 'package:crypto/crypto.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_image_compress/flutter_image_compress.dart';
@ -369,12 +367,3 @@ void printWrapped(String text) {
// ignore: avoid_print
pattern.allMatches(text).forEach((match) => print(match.group(0)));
}
Future<List<int>> sha256File(File file) async {
final input = file.openRead();
final sha256Sink = AccumulatorSink<Digest>();
final converter = sha256.startChunkedConversion(sha256Sink);
await input.forEach(converter.add);
converter.close();
return sha256Sink.events.single.bytes;
}

View file

@ -35,7 +35,6 @@ class BackgroundLayerData extends Layer {
required this.image,
});
ImageItem image;
bool imageLoaded = false;
}
class FilterLayerData extends Layer {

View file

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:twonly/src/views/camera/image_editor/data/layer.dart';
/// Main layer
class BackgroundLayer extends StatefulWidget {
const BackgroundLayer({
required this.layerData,
@ -22,17 +23,7 @@ class _BackgroundLayerState extends State<BackgroundLayer> {
height: widget.layerData.image.height.toDouble(),
// color: Theme.of(context).colorScheme.surface,
padding: EdgeInsets.zero,
child: Image.memory(
widget.layerData.image.bytes,
frameBuilder: (context, child, frame, wasSynchronouslyLoaded) {
if (wasSynchronouslyLoaded || frame != null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
widget.layerData.imageLoaded = true;
});
}
return child;
},
),
child: Image.memory(widget.layerData.image.bytes),
);
}
}

View file

@ -64,7 +64,6 @@ class _ShareImageEditorView extends State<ShareImageEditorView> {
VideoPlayerController? videoController;
ImageItem currentImage = ImageItem();
ScreenshotController screenshotController = ScreenshotController();
Timer? _imageLoadingTimer;
MediaFileService get mediaService => widget.mediaFileService;
MediaFile get media => widget.mediaFileService.mediaFile;
@ -121,7 +120,6 @@ class _ShareImageEditorView extends State<ShareImageEditorView> {
isDraftMedia: Value(false),
),
);
_imageLoadingTimer?.cancel();
super.dispose();
}
@ -451,10 +449,6 @@ class _ShareImageEditorView extends State<ShareImageEditorView> {
x.showCustomButtons = false;
}
setState(() {});
// Make a short delay, so the setState does have its effect...
await Future.delayed(const Duration(milliseconds: 10));
final image = await screenshotController.capture(
pixelRatio: pixelRatio,
);
@ -537,34 +531,16 @@ class _ShareImageEditorView extends State<ShareImageEditorView> {
}
});
layers.insert(
0,
BackgroundLayerData(
key: GlobalKey(),
image: currentImage,
),
);
setState(() {
layers.insert(
0,
BackgroundLayerData(
key: GlobalKey(),
image: currentImage,
),
);
});
// It is important that the user can sending the image only when the image is fully loaded otherwise if the user
// will click on send before the image is painted the screenshot will be transparent..
_imageLoadingTimer =
Timer.periodic(const Duration(milliseconds: 10), (timer) {
final imageLayer = layers.first;
if (imageLayer is BackgroundLayerData) {
if (imageLayer.imageLoaded) {
timer.cancel();
Future.delayed(const Duration(milliseconds: 50), () {
Log.info(imageLayer.imageLoaded);
if (context.mounted) {
setState(() {
sendingOrLoadingImage = false;
loadingImage = false;
});
}
});
}
}
sendingOrLoadingImage = false;
loadingImage = false;
});
}
@ -576,16 +552,16 @@ class _ShareImageEditorView extends State<ShareImageEditorView> {
if (!context.mounted) return;
// must be awaited so the widget for the screenshot is not already disposed when sending..
await storeImageAsOriginal();
// Insert media file into the messages database and start uploading process in the background
await insertMediaFileInMessagesTable(
mediaService,
[widget.sendToGroup!.groupId],
unawaited(
insertMediaFileInMessagesTable(
mediaService,
[widget.sendToGroup!.groupId],
storeImageAsOriginal(),
),
);
if (mounted) {
if (context.mounted) {
Navigator.pop(context, true);
}
}

View file

@ -286,6 +286,7 @@ class _ShareImageView extends State<ShareImageView> {
await insertMediaFileInMessagesTable(
widget.mediaFileService,
widget.selectedGroupIds.toList(),
null,
);
if (context.mounted) {

View file

@ -284,7 +284,7 @@ class ContactsListView extends StatelessWidget {
),
),
);
await sendContactMyProfileData(contact.userId);
await notifyContactsAboutProfileChange();
},
),
];

View file

@ -151,6 +151,7 @@ class _MessageInputState extends State<MessageInput> {
await insertMediaFileInMessagesTable(
mediaFileService,
[widget.group.groupId],
null,
);
}

View file

@ -7,7 +7,6 @@ import 'package:twonly/src/database/twonly.db.dart';
import 'package:twonly/src/model/memory_item.model.dart';
import 'package:twonly/src/services/mediafiles/mediafile.service.dart';
import 'package:twonly/src/utils/misc.dart';
import 'package:twonly/src/views/components/loader.dart';
import 'package:twonly/src/views/memories/memories_item_thumbnail.dart';
import 'package:twonly/src/views/memories/memories_photo_slider.view.dart';
@ -19,7 +18,6 @@ class MemoriesView extends StatefulWidget {
}
class MemoriesViewState extends State<MemoriesView> {
int _filesToMigrate = 0;
List<MemoryItem> galleryItems = [];
Map<String, List<int>> orderedByMonth = {};
List<String> months = [];
@ -40,21 +38,6 @@ class MemoriesViewState extends State<MemoriesView> {
}
Future<void> initAsync() async {
final nonHashedFiles =
await twonlyDB.mediaFilesDao.getAllNonHashedStoredMediaFiles();
if (nonHashedFiles.isNotEmpty) {
setState(() {
_filesToMigrate = nonHashedFiles.length;
});
for (final mediaFile in nonHashedFiles) {
final mediaService = MediaFileService(mediaFile);
await mediaService.hashStoredMedia();
setState(() {
_filesToMigrate -= 1;
});
}
_filesToMigrate = 0;
}
await messageSub?.cancel();
final msgStream = twonlyDB.mediaFilesDao.watchAllStoredMediaFiles();
@ -113,139 +96,122 @@ class MemoriesViewState extends State<MemoriesView> {
@override
Widget build(BuildContext context) {
Widget child = Center(
child: Text(
context.lang.memoriesEmpty,
textAlign: TextAlign.center,
),
);
if (_filesToMigrate > 0) {
child = Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
ThreeRotatingDots(
size: 40,
color: context.color.primary,
),
const SizedBox(height: 10),
Text(
context.lang.migrationOfMemories(_filesToMigrate),
textAlign: TextAlign.center,
),
],
),
);
} else if (galleryItems.isNotEmpty) {
child = ListView.builder(
itemCount:
(months.length * 2) + (_galleryItemsLastYears.isEmpty ? 0 : 1),
itemBuilder: (context, mIndex) {
if (_galleryItemsLastYears.isNotEmpty && mIndex == 0) {
return SizedBox(
height: 140,
width: MediaQuery.sizeOf(context).width,
child: ListView(
scrollDirection: Axis.horizontal,
children: _galleryItemsLastYears.entries.map(
(item) {
var text = context.lang.memoriesAYearAgo;
if (item.key > 1) {
text = context.lang.memoriesXYearsAgo(item.key);
}
return GestureDetector(
onTap: () async {
await open(context, item.value, 0);
},
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
boxShadow: const [
BoxShadow(
spreadRadius: -12,
blurRadius: 12,
),
],
),
clipBehavior: Clip.hardEdge,
height: 150,
width: 120,
child: Stack(
children: [
Positioned.fill(
child: ClipRRect(
borderRadius: BorderRadius.circular(12),
child: Image.file(
item.value.first.mediaService.storedPath,
fit: BoxFit.cover,
return Scaffold(
appBar: AppBar(title: const Text('Memories')),
body: Scrollbar(
child: (galleryItems.isEmpty)
? Center(
child: Text(
context.lang.memoriesEmpty,
textAlign: TextAlign.center,
),
)
: ListView.builder(
itemCount: (months.length * 2) +
(_galleryItemsLastYears.isEmpty ? 0 : 1),
itemBuilder: (context, mIndex) {
if (_galleryItemsLastYears.isNotEmpty && mIndex == 0) {
return SizedBox(
height: 140,
width: MediaQuery.sizeOf(context).width,
child: ListView(
scrollDirection: Axis.horizontal,
children: _galleryItemsLastYears.entries.map(
(item) {
var text = context.lang.memoriesAYearAgo;
if (item.key > 1) {
text = context.lang.memoriesXYearsAgo(item.key);
}
return GestureDetector(
onTap: () async {
await open(context, item.value, 0);
},
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
boxShadow: const [
BoxShadow(
spreadRadius: -12,
blurRadius: 12,
),
],
),
),
),
Positioned(
bottom: 10,
left: 0,
right: 0,
child: Text(
text,
textAlign: TextAlign.center,
style: const TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 20,
shadows: [
Shadow(
color: Color.fromARGB(122, 0, 0, 0),
blurRadius: 5,
clipBehavior: Clip.hardEdge,
height: 150,
width: 120,
child: Stack(
children: [
Positioned.fill(
child: ClipRRect(
borderRadius: BorderRadius.circular(12),
child: Image.file(
item.value.first.mediaService
.storedPath,
fit: BoxFit.cover,
),
),
),
Positioned(
bottom: 10,
left: 0,
right: 0,
child: Text(
text,
textAlign: TextAlign.center,
style: const TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 20,
shadows: [
Shadow(
color:
Color.fromARGB(122, 0, 0, 0),
blurRadius: 5,
),
],
),
),
),
],
),
),
),
],
),
);
},
).toList(),
),
);
},
).toList(),
),
);
}
if (_galleryItemsLastYears.isNotEmpty) {
mIndex -= 1;
}
if (mIndex.isEven) {
return Padding(
padding: const EdgeInsets.all(8),
child: Text(months[(mIndex ~/ 2)]),
);
}
final index = (mIndex - 1) ~/ 2;
return GridView.builder(
shrinkWrap: true,
physics: const ClampingScrollPhysics(),
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 4,
childAspectRatio: 9 / 16,
),
itemCount: orderedByMonth[months[index]]!.length,
itemBuilder: (context, gIndex) {
final gaIndex = orderedByMonth[months[index]]![gIndex];
return MemoriesItemThumbnail(
galleryItem: galleryItems[gaIndex],
onTap: () async {
await open(context, galleryItems, gaIndex);
}
if (_galleryItemsLastYears.isNotEmpty) {
mIndex -= 1;
}
if (mIndex.isEven) {
return Padding(
padding: const EdgeInsets.all(8),
child: Text(months[(mIndex ~/ 2)]),
);
}
final index = (mIndex - 1) ~/ 2;
return GridView.builder(
shrinkWrap: true,
physics: const ClampingScrollPhysics(),
gridDelegate:
const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 4,
childAspectRatio: 9 / 16,
),
itemCount: orderedByMonth[months[index]]!.length,
itemBuilder: (context, gIndex) {
final gaIndex = orderedByMonth[months[index]]![gIndex];
return MemoriesItemThumbnail(
galleryItem: galleryItems[gaIndex],
onTap: () async {
await open(context, galleryItems, gaIndex);
},
);
},
);
},
);
},
);
},
);
}
return Scaffold(
appBar: AppBar(title: const Text('Memories')),
body: Scrollbar(
child: child,
),
),
);
}

View file

@ -46,15 +46,6 @@ class _DataAndStorageViewState extends State<DataAndStorageView> {
setState(() {});
}
Future<void> toggleAutoStoreMediaFiles() async {
await updateUserdata((u) {
u.autoStoreAllSendUnlimitedMediaFiles =
!u.autoStoreAllSendUnlimitedMediaFiles;
return u;
});
setState(() {});
}
@override
Widget build(BuildContext context) {
final autoDownloadOptions =
@ -74,18 +65,6 @@ class _DataAndStorageViewState extends State<DataAndStorageView> {
onChanged: (a) => toggleStoreInGallery(),
),
),
ListTile(
title: Text(context.lang.autoStoreAllSendUnlimitedMediaFiles),
subtitle: Text(
context.lang.autoStoreAllSendUnlimitedMediaFilesSubtitle,
style: const TextStyle(fontSize: 9),
),
onTap: toggleAutoStoreMediaFiles,
trailing: Switch(
value: gUser.autoStoreAllSendUnlimitedMediaFiles,
onChanged: (a) => toggleAutoStoreMediaFiles(),
),
),
if (Platform.isAndroid)
ListTile(
title: Text(

View file

@ -3,6 +3,7 @@ import 'package:avatar_maker/avatar_maker.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:twonly/globals.dart';
import 'package:twonly/src/services/api/messages.dart';
import 'package:twonly/src/utils/misc.dart';
import 'package:twonly/src/utils/storage.dart';
@ -30,6 +31,7 @@ class _ModifyAvatarState extends State<ModifyAvatar> {
..avatarCounter = user.avatarCounter + 1;
return user;
});
await notifyContactsAboutProfileChange();
}
AvatarMakerThemeData getAvatarMakerTheme(BuildContext context) {

View file

@ -5,6 +5,7 @@ import 'package:flutter/services.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:twonly/globals.dart';
import 'package:twonly/src/model/protobuf/api/websocket/error.pb.dart';
import 'package:twonly/src/services/api/messages.dart';
import 'package:twonly/src/services/twonly_safe/common.twonly_safe.dart';
import 'package:twonly/src/services/twonly_safe/create_backup.twonly_safe.dart';
import 'package:twonly/src/utils/misc.dart';
@ -51,6 +52,7 @@ class _ProfileViewState extends State<ProfileView> {
..avatarCounter = user.avatarCounter + 1;
return user;
});
await notifyContactsAboutProfileChange();
setState(() {}); // gUser has updated
}
@ -84,6 +86,7 @@ class _ProfileViewState extends State<ProfileView> {
..avatarCounter = user.avatarCounter + 1;
return user;
});
await notifyContactsAboutProfileChange();
setState(() {}); // gUser has updated
}

View file

@ -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.80+80
environment:
sdk: ^3.6.0

View file

@ -7,7 +7,6 @@ import 'schema_v1.dart' as v1;
import 'schema_v2.dart' as v2;
import 'schema_v3.dart' as v3;
import 'schema_v4.dart' as v4;
import 'schema_v5.dart' as v5;
class GeneratedHelper implements SchemaInstantiationHelper {
@override
@ -21,12 +20,10 @@ class GeneratedHelper implements SchemaInstantiationHelper {
return v3.DatabaseAtV3(db);
case 4:
return v4.DatabaseAtV4(db);
case 5:
return v5.DatabaseAtV5(db);
default:
throw MissingSchemaException(version, versions);
}
}
static const versions = const [1, 2, 3, 4, 5];
static const versions = const [1, 2, 3, 4];
}

File diff suppressed because it is too large Load diff