Merge pull request #6092 from matrix-org/gsouquet/window-dimensions-reflow

This commit is contained in:
Germain 2021-05-25 12:00:08 +01:00 committed by GitHub
commit 1751b4ba43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 155 additions and 75 deletions

View file

@ -685,7 +685,9 @@ export default class CountlyAnalytics {
}
private getOrientation = (): Orientation => {
return window.innerWidth > window.innerHeight ? Orientation.Landscape : Orientation.Portrait;
return window.matchMedia("(orientation: landscape)").matches
? Orientation.Landscape
: Orientation.Portrait
};
private reportOrientation = () => {