🐛 Bug hotfix on attachment zoom (launch 2.0.0+14)

This commit is contained in:
LittleSheep 2024-12-02 00:40:27 +08:00
parent e8384338f8
commit 441df4090f
2 changed files with 5 additions and 2 deletions

View File

@ -41,6 +41,7 @@ class _AttachmentZoomViewState extends State<AttachmentZoomView> {
void initState() {
super.initState();
_pageController.addListener(_updatePage);
Future.delayed(const Duration(milliseconds: 100), _updatePage);
}
@override
@ -151,7 +152,9 @@ class _AttachmentZoomViewState extends State<AttachmentZoomView> {
child: Builder(builder: (context) {
final ud = context.read<UserDirectoryProvider>();
final item = widget.data.elementAt(
_pageController.page?.round() ?? 0,
widget.data.length > 1
? _pageController.page?.round() ?? 0
: 0,
);
final account = ud.getAccountFromCache(item.accountId);

View File

@ -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