clamp shown read receipts to at least 1
fixes weird error when rotating on directory page
This commit is contained in:
parent
4061b7b51e
commit
545fdd1f6b
1 changed files with 3 additions and 1 deletions
|
|
@ -1,3 +1,5 @@
|
||||||
|
import "dart:math";
|
||||||
|
|
||||||
import "package:hooks_riverpod/hooks_riverpod.dart";
|
import "package:hooks_riverpod/hooks_riverpod.dart";
|
||||||
import "package:material_ui/material_ui.dart";
|
import "package:material_ui/material_ui.dart";
|
||||||
import "package:material_adaptive_sheets/material_adaptive_sheets.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
|
// If they don't all fit, the last spot shows how many more there are
|
||||||
final shown = receipts.length <= fits
|
final shown = receipts.length <= fits
|
||||||
? receipts.length
|
? receipts.length
|
||||||
: fits - 1;
|
: max(0, fits - 1);
|
||||||
|
|
||||||
return Align(
|
return Align(
|
||||||
alignment: .centerRight,
|
alignment: .centerRight,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue