mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
chore: bump line length to 120 (#20191)
This commit is contained in:
parent
977c9b96ba
commit
ad65e9011a
517 changed files with 4520 additions and 9514 deletions
|
|
@ -31,8 +31,7 @@ class SyncStreamRepository extends DriftDatabaseRepository {
|
|||
|
||||
Future<void> deleteUsersV1(Iterable<SyncUserDeleteV1> data) async {
|
||||
try {
|
||||
await _db.userEntity
|
||||
.deleteWhere((row) => row.id.isIn(data.map((e) => e.userId)));
|
||||
await _db.userEntity.deleteWhere((row) => row.id.isIn(data.map((e) => e.userId)));
|
||||
} catch (error, stack) {
|
||||
_logger.severe('Error: SyncUserDeleteV1', error, stack);
|
||||
rethrow;
|
||||
|
|
@ -84,8 +83,7 @@ class SyncStreamRepository extends DriftDatabaseRepository {
|
|||
try {
|
||||
await _db.batch((batch) {
|
||||
for (final partner in data) {
|
||||
final companion =
|
||||
PartnerEntityCompanion(inTimeline: Value(partner.inTimeline));
|
||||
final companion = PartnerEntityCompanion(inTimeline: Value(partner.inTimeline));
|
||||
|
||||
batch.insert(
|
||||
_db.partnerEntity,
|
||||
|
|
@ -129,8 +127,7 @@ class SyncStreamRepository extends DriftDatabaseRepository {
|
|||
type: Value(asset.type.toAssetType()),
|
||||
createdAt: Value.absentIfNull(asset.fileCreatedAt),
|
||||
updatedAt: Value.absentIfNull(asset.fileModifiedAt),
|
||||
durationInSeconds:
|
||||
Value(asset.duration?.toDuration()?.inSeconds ?? 0),
|
||||
durationInSeconds: Value(asset.duration?.toDuration()?.inSeconds ?? 0),
|
||||
checksum: Value(asset.checksum),
|
||||
isFavorite: Value(asset.isFavorite),
|
||||
ownerId: Value(asset.ownerId),
|
||||
|
|
@ -662,9 +659,7 @@ extension on String {
|
|||
extension on String {
|
||||
Duration? toDuration() {
|
||||
try {
|
||||
final parts = split(':')
|
||||
.map((e) => double.parse(e).toInt())
|
||||
.toList(growable: false);
|
||||
final parts = split(':').map((e) => double.parse(e).toInt()).toList(growable: false);
|
||||
|
||||
return Duration(hours: parts[0], minutes: parts[1], seconds: parts[2]);
|
||||
} catch (_) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue