1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-04 11:51:45 +03:00

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
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 = () => {