mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-03-26 08:54:42 +01:00
Fix view exceptions in the new viewer
This commit is contained in:
parent
3576f7e397
commit
03015e999e
2 changed files with 5 additions and 4 deletions
|
@ -163,7 +163,7 @@ class _PageViewState extends State<_PageView> {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
if (mounted) {
|
if (mounted && _scrollController.hasClients) {
|
||||||
_scrollController.jumpTo(0);
|
_scrollController.jumpTo(0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -87,9 +87,10 @@ class _ZoomableViewerState extends State<ZoomableViewer>
|
||||||
}
|
}
|
||||||
|
|
||||||
void _setIsZooming(bool flag) {
|
void _setIsZooming(bool flag) {
|
||||||
setState(() {
|
_isZooming = flag;
|
||||||
_isZooming = flag;
|
if (mounted) {
|
||||||
});
|
setState(() {});
|
||||||
|
}
|
||||||
final next = _isZoomed;
|
final next = _isZoomed;
|
||||||
if (next != _wasZoomed) {
|
if (next != _wasZoomed) {
|
||||||
_wasZoomed = next;
|
_wasZoomed = next;
|
||||||
|
|
Loading…
Add table
Reference in a new issue