FIX: do not set VH while zooming (#21538)

This was an optimisation I mistakenly removed from 4cfa78c3f3
This commit is contained in:
Joffrey JAFFEUX 2023-05-13 17:39:24 +02:00 committed by GitHub
parent 4cfa78c3f3
commit 3f2c16a8d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,7 @@
import { bind } from "discourse-common/utils/decorators";
import Component from "@ember/component";
import { inject as service } from "@ember/service";
import isZoomed from "discourse/plugins/chat/discourse/lib/zoom-check";
const CSS_VAR = "--chat-vh";
let lastVH;
@ -31,6 +32,10 @@ export default class ChatVh extends Component {
@bind
setVH() {
if (isZoomed()) {
return;
}
const vh = (this.activeWindow?.height || window.innerHeight) * 0.01;
if (lastVH === vh) {