Fix closing media viewer by slide

This commit is contained in:
Eduard Kuzmenko 2022-02-11 19:54:51 +04:00
parent dd8cac0b91
commit 7f48b0601f
2 changed files with 4 additions and 4 deletions

4
.env
View File

@ -1,5 +1,5 @@
API_ID=1025907 API_ID=1025907
API_HASH=452b0359b988148995f22ff0f4229750 API_HASH=452b0359b988148995f22ff0f4229750
VERSION=1.1.0 VERSION=1.1.0
VERSION_FULL=1.1.0 (97) VERSION_FULL=1.1.0 (98)
BUILD=97 BUILD=98

View File

@ -310,7 +310,7 @@ export default class AppMediaViewerBase<
const percentsY = Math.abs(yDiff) / windowSize.height; const percentsY = Math.abs(yDiff) / windowSize.height;
if(percentsY > .2 || yDiff > 125) { if(percentsY > .2 || yDiff > 125) {
this.buttons.close.click(); this.close();
return true; return true;
} }
@ -492,7 +492,7 @@ export default class AppMediaViewerBase<
}); });
if(/* target === this.mediaViewerDiv */!mover || (!isZooming && (target.tagName === 'IMG' || target.tagName === 'image'))) { if(/* target === this.mediaViewerDiv */!mover || (!isZooming && (target.tagName === 'IMG' || target.tagName === 'image'))) {
this.buttons.close.click(); this.close();
} }
}; };