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