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

This commit is contained in:
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);