From 545fdd1f6b81a85554cf78cb3374ea7557f23e9a Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Thu, 5 Nov 2026 23:29:10 -0500 Subject: [PATCH] clamp shown read receipts to at least 1 fixes weird error when rotating on directory page --- lib/widgets/read_receipts_row.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/widgets/read_receipts_row.dart b/lib/widgets/read_receipts_row.dart index 468e4b7..fb20e3d 100644 --- a/lib/widgets/read_receipts_row.dart +++ b/lib/widgets/read_receipts_row.dart @@ -1,3 +1,5 @@ +import "dart:math"; + import "package:hooks_riverpod/hooks_riverpod.dart"; import "package:material_ui/material_ui.dart"; import "package:material_adaptive_sheets/material_adaptive_sheets.dart"; @@ -44,7 +46,7 @@ class const ReadReceiptsRow( // If they don't all fit, the last spot shows how many more there are final shown = receipts.length <= fits ? receipts.length - : fits - 1; + : max(0, fits - 1); return Align( alignment: .centerRight,