[mob][photos] Don't show empty faces in debug

This commit is contained in:
laurenspriem 2024-05-15 12:04:10 +05:30
parent 6ab1371077
commit c142ed07b8
2 changed files with 8 additions and 0 deletions

View file

@ -233,6 +233,12 @@ class _FaceWidgetState extends State<FaceWidget> {
style: Theme.of(context).textTheme.bodySmall,
maxLines: 1,
),
if (kDebugMode && widget.face.score < 0.75)
Text(
'[Debug only]',
style: Theme.of(context).textTheme.bodySmall,
maxLines: 1,
),
// if (kDebugMode)
// if (highlight)
// const Text(

View file

@ -79,6 +79,8 @@ class _FacesItemWidgetState extends State<FacesItemWidget> {
// Remove faces with low scores
if (!kDebugMode) {
faces.removeWhere((face) => (face.score < 0.75));
} else {
faces.removeWhere((face) => (face.score < 0.5));
}
if (faces.isEmpty) {