mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 09:28:41 +00:00
fix analyser issues
This commit is contained in:
parent
5ae943bcf3
commit
b03bcfe6e1
5 changed files with 22 additions and 16 deletions
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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!);
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue