viewer: fixed zoom reset when deleting entry and next entry is the same size
This commit is contained in:
parent
2f6a851e68
commit
44be2de223
1 changed files with 2 additions and 2 deletions
|
@ -72,8 +72,8 @@ class _EntryPageViewState extends State<EntryPageView> {
|
||||||
void didUpdateWidget(covariant EntryPageView oldWidget) {
|
void didUpdateWidget(covariant EntryPageView oldWidget) {
|
||||||
super.didUpdateWidget(oldWidget);
|
super.didUpdateWidget(oldWidget);
|
||||||
|
|
||||||
if (oldWidget.pageEntry.displaySize != widget.pageEntry.displaySize) {
|
if (oldWidget.pageEntry.uri != widget.pageEntry.uri || oldWidget.pageEntry.displaySize != widget.pageEntry.displaySize) {
|
||||||
// do not reset the magnifier view state unless page dimensions change,
|
// do not reset the magnifier view state unless main entry or page entry dimensions change,
|
||||||
// in effect locking the zoom & position when browsing entry pages of the same size
|
// in effect locking the zoom & position when browsing entry pages of the same size
|
||||||
_unregisterWidget();
|
_unregisterWidget();
|
||||||
_registerWidget();
|
_registerWidget();
|
||||||
|
|
Loading…
Reference in a new issue