diff --git a/mobile/lib/db/ml/db.dart b/mobile/lib/db/ml/db.dart index 3103e80442..0d4b0c2772 100644 --- a/mobile/lib/db/ml/db.dart +++ b/mobile/lib/db/ml/db.dart @@ -449,7 +449,7 @@ class MLDataDB { final db = await instance.asyncDB; final List> maps = await db.getAll( 'SELECT $personIdColumn, $faceClustersTable.$clusterIDColumn, $faceIDColumn FROM $clusterPersonTable ' - 'LEFT JOIN $faceClustersTable ON $clusterPersonTable.$clusterIDColumn = $faceClustersTable.$clusterIDColumn', + 'INNER JOIN $faceClustersTable ON $clusterPersonTable.$clusterIDColumn = $faceClustersTable.$clusterIDColumn', ); final Map>> result = {}; for (final map in maps) { diff --git a/mobile/lib/models/ml/face/face.dart b/mobile/lib/models/ml/face/face.dart index 4a794baff5..2aeeb7aff3 100644 --- a/mobile/lib/models/ml/face/face.dart +++ b/mobile/lib/models/ml/face/face.dart @@ -101,7 +101,7 @@ class Face { json['score'] as double, Detection.fromJson(json['detection'] as Map), // high value means t - (json['blur'] ?? kLapacianDefault) as double, + parseIntOrDoubleAsDouble(json['blur']) ?? kLapacianDefault, ); } @@ -116,6 +116,13 @@ class Face { }; } +double? parseIntOrDoubleAsDouble(dynamic value) { + if (value == null) return null; + if (value is int) return value * 1.0; + if (value is double) return value; + return null; +} + List parseAsDoubleList(List inputList) { if (inputList.isEmpty) return const []; diff --git a/mobile/lib/ui/viewer/file/native_video_player_controls/seek_bar.dart b/mobile/lib/ui/viewer/file/native_video_player_controls/seek_bar.dart index f37791d56e..dafd812db4 100644 --- a/mobile/lib/ui/viewer/file/native_video_player_controls/seek_bar.dart +++ b/mobile/lib/ui/viewer/file/native_video_player_controls/seek_bar.dart @@ -112,6 +112,9 @@ class _SeekBarState extends State with SingleTickerProviderStateMixin { //Video starts playing after a slight delay. This delay is to ensure that //the seek bar animation starts after the video starts playing. Future.delayed(const Duration(milliseconds: 700), () { + if (!mounted) { + return; + } if (widget.duration != null) { unawaited( _animationController.animateTo( diff --git a/mobile/lib/ui/viewer/gallery/gallery.dart b/mobile/lib/ui/viewer/gallery/gallery.dart index db2f1d2906..c9c0f35a4b 100644 --- a/mobile/lib/ui/viewer/gallery/gallery.dart +++ b/mobile/lib/ui/viewer/gallery/gallery.dart @@ -115,8 +115,9 @@ class GalleryState extends State { @override void initState() { super.initState(); + // end the tag with x to avoid `.` in the end if logger name _logTag = - "Gallery_${widget.tagPrefix}${kDebugMode ? "_" + widget.albumName! : ""}"; + "Gallery_${widget.tagPrefix}${kDebugMode ? "_" + widget.albumName! : ""}_x"; _logger = Logger(_logTag); _logger.finest("init Gallery"); _debouncer = Debouncer(