Merge pull request #6092 from matrix-org/gsouquet/window-dimensions-reflow
This commit is contained in:
commit
1751b4ba43
20 changed files with 155 additions and 75 deletions
|
@ -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 = () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue