fix analyser issues

This commit is contained in:
otsmr 2025-10-26 01:15:54 +02:00
parent 5ae943bcf3
commit b03bcfe6e1
5 changed files with 22 additions and 16 deletions

View file

@ -1,9 +1,9 @@
import 'dart:io';
// import 'dart:io';
import 'package:camera/camera.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:path/path.dart';
import 'package:path_provider/path_provider.dart';
// import 'package:path/path.dart';
// import 'package:path_provider/path_provider.dart';
import 'package:provider/provider.dart';
import 'package:twonly/globals.dart';
import 'package:twonly/src/database/twonly.db.dart';

View file

@ -57,12 +57,14 @@ class GroupsDao extends DatabaseAccessor<TwonlyDB> with _$GroupsDaoMixin {
final result = await _insertGroup(insertGroup);
if (result != null) {
await into(groupMembers).insert(GroupMembersCompanion(
groupId: Value(result.groupId),
contactId: Value(
contactId,
await into(groupMembers).insert(
GroupMembersCompanion(
groupId: Value(result.groupId),
contactId: Value(
contactId,
),
),
));
);
}
return result;
}

View file

@ -20,7 +20,8 @@ class ConnectPreKeyStore extends PreKeyStore {
.get();
if (preKeyRecord.isEmpty) {
throw InvalidKeyIdException(
'[PREKEY] No such preKey record! - $preKeyId');
'[PREKEY] No such preKey record! - $preKeyId',
);
}
Log.info('[PREKEY] Contact used my preKey $preKeyId');
final preKey = preKeyRecord.first.preKey;

View file

@ -121,7 +121,8 @@ Future<void> handleMediaUpdate(
.getSingleOrNull();
if (message == null) {
Log.error(
'Got media update to message ${mediaUpdate.targetMessageId} but message not found.');
'Got media update to message ${mediaUpdate.targetMessageId} but message not found.',
);
}
final mediaFile =
await twonlyDB.mediaFilesDao.getMediaFileById(message!.mediaId!);

View file

@ -185,7 +185,8 @@ class _DatabaseMigrationViewState extends State<DatabaseMigrationView> {
for (final oldSignalSessionStore in oldSignalSessionStores) {
try {
await twonlyDB.into(twonlyDB.signalSessionStores).insert(
SignalSessionStore.fromJson(oldSignalSessionStore.toJson()));
SignalSessionStore.fromJson(oldSignalSessionStore.toJson()),
);
} catch (e) {
Log.error(e);
}
@ -221,7 +222,8 @@ class _DatabaseMigrationViewState extends State<DatabaseMigrationView> {
try {
await twonlyDB.into(twonlyDB.signalIdentityKeyStores).insert(
SignalIdentityKeyStore.fromJson(
oldSignalIdentityKeyStore.toJson()),
oldSignalIdentityKeyStore.toJson(),
),
);
} catch (e) {
Log.error(e);
@ -271,8 +273,8 @@ class _DatabaseMigrationViewState extends State<DatabaseMigrationView> {
),
const SizedBox(height: 40),
...[
'${_contactsMigrated} Kontakte',
'${_storedMediaFiles} gespeicherte Mediendateien',
'$_contactsMigrated Kontakte',
'$_storedMediaFiles gespeicherte Mediendateien',
].map(
(e) => Text(
e,
@ -333,8 +335,8 @@ class _DatabaseMigrationViewState extends State<DatabaseMigrationView> {
style: TextStyle(fontSize: 20),
),
...[
'${_contactsMigrated} Kontakte',
'${_storedMediaFiles} gespeicherte Mediendateien',
'$_contactsMigrated Kontakte',
'$_storedMediaFiles gespeicherte Mediendateien',
].map(
(e) => Text(
e,