diff --git a/lib/widgets/attachment/attachment_detail.dart b/lib/widgets/attachment/attachment_detail.dart index 40f7b09..d2fb408 100644 --- a/lib/widgets/attachment/attachment_detail.dart +++ b/lib/widgets/attachment/attachment_detail.dart @@ -41,6 +41,7 @@ class _AttachmentZoomViewState extends State { void initState() { super.initState(); _pageController.addListener(_updatePage); + Future.delayed(const Duration(milliseconds: 100), _updatePage); } @override @@ -151,7 +152,9 @@ class _AttachmentZoomViewState extends State { child: Builder(builder: (context) { final ud = context.read(); final item = widget.data.elementAt( - _pageController.page?.round() ?? 0, + widget.data.length > 1 + ? _pageController.page?.round() ?? 0 + : 0, ); final account = ud.getAccountFromCache(item.accountId); diff --git a/pubspec.yaml b/pubspec.yaml index 6329ef3..0713e5a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 2.0.0+13 +version: 2.0.0+14 environment: sdk: ^3.5.4